#include <nitro/os.h>
void OS_VisitAllocated( OSArenaID id, OSAllocVisitor visitor );
This function calls the user specified function visitor with the target being all of the memory blocks allocated to the heaps included in the specified arena by an arena ID id. See the following for details about this value OS_InitArena.
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.
id |
The arena ID of the arena that is associated with the memory block. |
visitor |
The function that is called for each memory block. See below the items below for definitions. |
None.
OS_InitArena, OS_InitAlloc, OS_AllocFromHeap
01/07/2004 Initial version