#include <nitro/os.h>
u32 OS_GetTotalAllocSize( OSArenaId id, OSHeapHandle heap );
This function obtains the total size of the memory blocks allocated to the heap.
Set OS_CURRENT_HEAP_HANDLE in heap to specify the current heap.
The size refers to the size of the data regions. The memory block headers are not included in the size value.
All allocated blocks are tracked down and calculated, so the time required for the process is proportional to the amount of memory blocks.
| id | Arena ID of the arena for the heap from which the total size is obtained |
| heap | Heap handle of the heap from which the total size is obtained |
The total size (in bytes) of the memory blocks allocated to the heap.
OS_InitAlloc, OS_GetTotalFreeSize, OS_GetMaxFreeSize
11/05/2004 Initial Version