Skip to main content
Wrend.1
Associate III
December 16, 2020
Solved

What is the working mechanism of "FrontendHeap::getInstance()" ?

  • December 16, 2020
  • 1 reply
  • 1195 views

The size of "heap" in my project up to 70+KB in RAM.

What are the factors that can affect its size?

void touchgfx_init()
{
 Bitmap::registerBitmapDatabase(BitmapDatabase::getInstance(), BitmapDatabase::getInstanceSize());
 TypedText::registerTexts(&texts);
 Texts::setLanguage(0);
 
 FontManager::setFontProvider(&fontProvider);
 
 FrontendHeap& heap = FrontendHeap::getInstance();// this is too big
 (void)heap; // we need to obtain the reference above to initialize the frontend heap.
 
 hal.initialize();
}

This topic has been closed for replies.
Best answer by Michael K

"Based on the classes defined it is possible for the C++ compiler to calculate the size of the largest screen classes, and reserve memory for those classes.

The memory usage in internal RAM thus does not depend on the number of screens in the application, but on the size of the largest screen.

The memory set aside for these objects is called the FrontendHeap."

From: https://support.touchgfx.com/docs/basic-concepts/memory-usage

Do you use a lot of high resolution images, or large fonts with large wildcard ranges?

1 reply

Michael K
Michael KBest answer
Senior III
December 16, 2020

"Based on the classes defined it is possible for the C++ compiler to calculate the size of the largest screen classes, and reserve memory for those classes.

The memory usage in internal RAM thus does not depend on the number of screens in the application, but on the size of the largest screen.

The memory set aside for these objects is called the FrontendHeap."

From: https://support.touchgfx.com/docs/basic-concepts/memory-usage

Do you use a lot of high resolution images, or large fonts with large wildcard ranges?

Embedded UI/UX Consulting: cadenza.design