OS_IsOnMainMemory / OS_IsOnWram

Syntax

#include <nitro/os.h>
BOOL OS_IsOnMainMemory(void* ptr);
BOOL OS_IsOnExtendedMainMemory(void* ptr);
BOOL OS_IsOnWramA(void* ptr);
BOOL OS_IsOnWramB(void* ptr);
BOOL OS_IsOnWramC(void* ptr);
BOOL OS_IsOnWram0(void* ptr);
BOOL OS_IsOnWram1(void* ptr);
BOOL OS_IsOnWram(void* ptr);
BOOL OS_IsOnVram(void* ptr);
BOOL OS_IsOnItcm(void* ptr);
BOOL OS_IsOnDtcm(void* ptr);
BOOL OS_IsOnArm7PrvWram(void* ptr);

Arguments

ptr Pointer to memory region to be checked.

Return Values

Returns TRUE if the memory address indicated by ptr is in the memory to be checked.

Description

Checks the memory address indicated by ptr.

The OS_IsOnMainMemory function checks whether the memory address indicated by the pointer exists in main memory.

The OS_IsOnExtendedMainMemory function checks whether the memory address indicated by the pointer exists in extended main memory.

The OS_IsOnWramA function checks whether the memory address indicated by the pointer exists in WRAM A. If this function is called from the ARM9 or a NITRO system, it always returns FALSE.

The OS_IsOnWramB function checks whether the memory address indicated by the pointer exists in WRAM B. Always returns FALSE for NITRO.

The OS_IsOnWramC function checks whether the memory address indicated by the pointer exists in WRAM C. Always returns FALSE for NITRO.

The OS_IsOnWram0 function checks whether the memory address indicated by the pointer exists in WRAM 0.

The OS_IsOnWram1 function checks whether the memory address indicated by the pointer exists in WRAM 1.

The OS_IsOnWram function checks whether the memory address indicated by the pointer exists in either WRAM A, WRAM B, WRAM C, WRAM 0 or WRAM 1.

The OS_IsOnVram function checks whether the memory address indicated by the pointer exists in VRAM.

The OS_IsOnItcm function checks whether the memory address indicated by the pointer exists in ITCM. If this function is called from the ARM7, its check always returns FALSE.

The OS_IsOnDtcm function checks whether the memory address indicated by the pointer exists in DTCM. If this function is called from the ARM7, its check always returns FALSE.

The OS_IsOnArm7PrvWram function checks whether the memory address indicated by the pointer exists in ARM7-dedicated WRAM. If this function is called from the ARM9, its check always returns FALSE.

See Also

OS_AllocFromHeap

Revision History

2009/04/13 Initial version.


CONFIDENTIAL