Platform Package reference: Function EwGetHeapInfo()
Description of the function EwGetHeapInfo() 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
void EwGetHeapInfo
(
long* aNoOfMemoryPools,
long* aTotalSize,
long* aFreeSize,
long* aNoOfUsedBlocks,
long* aNoOfFreeBlocks,
long* aSmallestFreeBlock,
long* aLargestFreeBlock,
unsigned long* aSmallAllocCounter,
unsigned long* aLargeAllocCounter,
unsigned long* aFreeCounter
)
Parameters
aNoOfMemoryPools
Receives the number of managed memory pools. Memory pools are added to the heap by using the function EwAddHeapMemoryPool().
aTotalSize
Receives the size in bytes of the entire memory (used and free).
aFreeSize
Receives the size in bytes of the free memory.
aNoOfUsedBlocks
Receives the number of allocated memory blocks.
aNoOfFreeBlocks
Receives the number of free blocks.
aSmallestFreeBlock
Receives the size in bytes of the smallest free block.
aLargestFreeBlock
Receives the size in bytes of the largest free block.
aSmallAllocCounter
Receives the total number of performed alloc operations with small blocks.
aLargeAllocCounter
Receives the total number of performed alloc operations with large blocks.
aFreeCounter
Receives the total number of performed free operations.
Discussion
The function EwGetHeapInfo() returns few information reflecting the actual state of the heap manager. As such it is useful for debugging purpose and tests. The functions copies the values into variables referred by the function parameters. If a parameter is NULL, the value is ignored.