OS_GetTotalFreeSize


C Specification

#include <nitro/os.h>
u32 OS_GetTotalFreeSize( OSArenaId id, OSHeapHandle heap );

Description

This function gets the total size of the free blocks in the heap.

Set OS_CURRENT_HEAP_HANDLE in heap to specify the current heap.

The size refers to the size of the free blocks' data regions. The free blocks' headers are not included in the size value.

All free blocks are tracked down and calculated, so the time required for the process is proportional to the amount of memory blocks.

Arguments

id Arena ID of the arena for the heap from which total size is obtained
heap Heap handle of the heap from which total size is obtained

Return Values

The total size (in bytes) of the free blocks in the heap.

See Also

OS_InitAlloc, OS_GetTotalAllocSize, OS_GetMaxFreeSize

Revision History

11/05/2004 Initial Version