Platform Package reference: Function EwInitHeap()

Description of the function EwInitHeap() available in all Platform Packages for C compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.

Declaration

int EwInitHeap( int aLargeObjectSize )

Parameters

aLargeObjectSize

Determines the size of objects considered as large and long-lasting. Such objects are allocated from the end of the list of free memory blocks. All other objects are allocated from the begin of the list. This reduces the probability for heap fragmentation. If this parameter is <= 0 (zero) a default value for the LargeObjectSize setting is assumed.

Discussion

The function EwInitHeap() initializes the heap manager. Thereupon memory pools can be added by using the function EwAddHeapMemoryPool(). If there was heap manager initialized previously, the associated information is discarded with this invocation. The function should be called at the startup time during the Initialization of the GUI Application. Returns != 0 (zero) if successful.