summaryrefslogtreecommitdiff
path: root/arm9/lib/libnns/include/NNS_FND_allocator.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-07-25 13:23:02 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-07-25 13:23:02 -0400
commit5e0e326b75402a36c4d31502b8b5a05b862ac23c (patch)
tree1b5807c1efb72dbdd9d01f329cefb41171913a64 /arm9/lib/libnns/include/NNS_FND_allocator.h
parent1f9d4503c898f9138422215132b53224571a281a (diff)
parent68d7aa47cc52ef822220e0e35890863d7cad479f (diff)
Merge remote-tracking branch 'origin/master' into pikalax_work
Diffstat (limited to 'arm9/lib/libnns/include/NNS_FND_allocator.h')
-rw-r--r--arm9/lib/libnns/include/NNS_FND_allocator.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/arm9/lib/libnns/include/NNS_FND_allocator.h b/arm9/lib/libnns/include/NNS_FND_allocator.h
new file mode 100644
index 00000000..eb17fa70
--- /dev/null
+++ b/arm9/lib/libnns/include/NNS_FND_allocator.h
@@ -0,0 +1,34 @@
+#ifndef GUARD_NNS_FND_ALLOCATOR_H
+#define GUARD_NNS_FND_ALLOCATOR_H
+
+#include "NNS_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 //GUARD_NNS_FND_ALLOCATOR_H