mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-05-10 21:08:16 -05:00
28 lines
741 B
C
28 lines
741 B
C
#ifndef NNSYS_FND_ALLOCATOR_H_
|
|
#define NNSYS_FND_ALLOCATOR_H_
|
|
|
|
#include <nnsys/fnd/heapcommon.h>
|
|
|
|
typedef struct NNSFndAllocator NNSFndAllocator;
|
|
|
|
typedef void *(*NNSFndFuncAllocatorAlloc)(NNSFndAllocator *pAllocator, u32 size);
|
|
typedef void (*NNSFndFuncAllocatorFree)(NNSFndAllocator *pAllocator,void *memBlock);
|
|
|
|
typedef struct NNSFndAllocatorFunc NNSFndAllocatorFunc;
|
|
|
|
struct NNSFndAllocatorFunc {
|
|
NNSFndFuncAllocatorAlloc pfAlloc;
|
|
NNSFndFuncAllocatorFree pfFree;
|
|
};
|
|
|
|
struct NNSFndAllocator {
|
|
NNSFndAllocatorFunc const * pFunc;
|
|
void *pHeap;
|
|
u32 heapParam1;
|
|
u32 heapParam2;
|
|
};
|
|
|
|
void NNS_FndInitAllocatorForExpHeap(NNSFndAllocator *pAllocator, NNSFndHeapHandle heap, int alignment);
|
|
|
|
#endif //NNSYS_FND_ALLOCATOR_H_
|