NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
OSMemory.h
1#ifndef RVL_SDK_OS_MEMORY_H
2#define RVL_SDK_OS_MEMORY_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#define OS_MEM_KB_TO_B(mb) ((mb) * 1024)
9#define OS_MEM_B_TO_KB(mb) ((mb) / 1024)
10
11#define OS_MEM_MB_TO_B(mb) ((mb) * 1024 * 1024)
12#define OS_MEM_B_TO_MB(mb) ((mb) / 1024 / 1024)
13
14#define OSIsMEM1Region(addr) (((u32)(addr) & 0x30000000) == 0)
15#define OSIsMEM2Region(addr) (((u32)(addr) & 0x30000000) == 0x10000000)
16
17#define OS_IS_MEM1_REGION(addr) OSIsMEM1Region(addr)
18#define OS_IS_MEM2_REGION(addr) OSIsMEM2Region(addr)
19
20u32 OSGetPhysicalMem1Size(void);
21u32 OSGetPhysicalMem2Size(void);
22u32 OSGetConsoleSimulatedMem1Size(void);
23u32 OSGetConsoleSimulatedMem2Size(void);
24void __OSInitMemoryProtection(void);
25
26#ifdef __cplusplus
27}
28#endif
29#endif