coreinit: Add some memory functions.

Adds OSGetForegroundBucket, OSGetForegroundBucketFreeArea, OSGetMemBound.
This commit is contained in:
James Benton 2018-05-30 13:11:57 +01:00
parent 3e117fe667
commit 42ac732b2e
2 changed files with 23 additions and 1 deletions

View File

@ -266,6 +266,9 @@ OSBlockMove
OSBlockSet OSBlockSet
OSAllocFromSystem OSAllocFromSystem
OSFreeToSystem OSFreeToSystem
OSGetForegroundBucket
OSGetForegroundBucketFreeArea
OSGetMemBound
// coreinit/memorymap.h // coreinit/memorymap.h
OSEffectiveToPhysical OSEffectiveToPhysical

View File

@ -12,6 +12,12 @@
extern "C" { extern "C" {
#endif #endif
typedef enum OSMemoryType
{
OS_MEM1 = 1,
OS_MEM2 = 2,
} OSMemoryType;
void * void *
OSBlockMove(void *dst, OSBlockMove(void *dst,
const void *src, const void *src,
@ -23,13 +29,26 @@ OSBlockSet(void *dst,
uint8_t val, uint8_t val,
uint32_t size); uint32_t size);
void* void *
OSAllocFromSystem(uint32_t size, OSAllocFromSystem(uint32_t size,
int align); int align);
void void
OSFreeToSystem(void *ptr); OSFreeToSystem(void *ptr);
BOOL
OSGetForegroundBucket(uint32_t *outAddr,
uint32_t *outSize);
BOOL
OSGetForegroundBucketFreeArea(uint32_t *outAddr,
uint32_t *outSize);
int
OSGetMemBound(OSMemoryType type,
uint32_t *outAddr,
uint32_t *outSize);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif