OS_VisitAllocated

Syntax

#include <nitro/os.h>
void OS_VisitAllocated( OSArenaID id, OSAllocVisitor visitor );

Arguments

id ID of the arena associated with the memory block
visitor The function that is called for each memory block. See below the items below for definitions.

Return Values

None.

Description

This function calls the user-specified function visitor with the target being all of the memory blocks allocated to the heaps.

The arena is specified with the arena ID (id). To read more about this value, see OS_InitArena.

The visitor type, OSAllocVisitor, is defined as follows.

typedef void (*OSAllocVisitor)( void* obj, u32 size );

The first argument is a pointer to the memory block; the second argument is the size of the memory block. The pointer does not point to the managing header, but to the actual data region. The size is in bytes and is the size that the memory block occupies in the heap, excluding the management header.

See Also

OS_InitArena, OS_InitAlloc, OS_AllocFromHeap

Revision History

2004/01/07 Initial version.


CONFIDENTIAL