OS_AllocFrom*ArenaLo

Syntax

#include <nitro/os.h>
void* OS_AllocFromArenaLo( OSArenaId id, u32 size, u32 alignment );

void* OS_AllocFromMainArenaLo( u32 size, u32 alignment );
void* OS_AllocFromSubPrivArenaLo( u32 size, u32 alignment );
void* OS_AllocFromMainExArenaLo( u32 size, u32 alignment );
void* OS_AllocFromITCMArenaLo( u32 size, u32 alignment );
void* OS_AllocFromDTCMArenaLo( u32 size, u32 alignment );
void* OS_AllocFromSharedArenaLo( u32 size, u32 alignment );
void* OS_AllocFromWramMainArenaLo( u32 size, u32 alignment );
void* OS_AllocFromWramSubArenaLo( u32 size, u32 alignment );
void* OS_AllocFromWramSubPrivArenaLo( u32 size, u32 alignment );

Arguments

id Arena ID
size Size to be reserved
alignment Alignment specification for the region's start address

Return Values

The start address of the reserved region.

Description

This function reserves a region from the bottom of an arena. id specifies an arena using an arena ID. For details on arena ID see OS_InitArena(). For details on arena ID, see OS_InitArena(). size specifies the size to be reserved in bytes. alignment specifies alignment for the reserved region. After the region is reserved, the arena's lower boundary address will be changed by the size of the region that was taken. Because no upward boundary check is performed, problems will occur if a region larger than the arena is reserved.

OS_AllocFromMainArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_MAIN, ... ).
OS_AllocFromSubPrivArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_MAIN_SUBPRIV, ... ).
OS_AllocFromMainExArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_MAINEX, ... ).
OS_AllocFromITCMArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_ITCM, ... ).
OS_AllocFromDTCMArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_DTCM, ... ).
OS_AllocFromSharedArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_SHARED, ... ).
OS_AllocFromWramMainArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_WRAM_MAIN, ... ).
OS_AllocFromWramSubArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_WRAM_SUB, ... ).
OS_AllocFromWramSubPrivArenaLo is the inline function for OS_AllocFromArenaLo( OS_ARENA_WRAM_SUBPRIV, ... ).

See Also

OS_InitArena, OS_AllocFromArenaHi

Revision History

2004/02/19 Changed the number of arenas from 6 to 9.
2004/01/06 Initial version.


CONFIDENTIAL