cancel
Showing results for 
Search instead for 
Did you mean: 

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

Wrend.1
Senior

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();
}

1 ACCEPTED SOLUTION

Accepted Solutions
Michael K
Senior III

"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

View solution in original post

1 REPLY 1
Michael K
Senior III

"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