summaryrefslogtreecommitdiff
path: root/arm9/lib/NitroSDK/include/custom_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/NitroSDK/include/custom_allocator.h
parent1f9d4503c898f9138422215132b53224571a281a (diff)
parent68d7aa47cc52ef822220e0e35890863d7cad479f (diff)
Merge remote-tracking branch 'origin/master' into pikalax_work
Diffstat (limited to 'arm9/lib/NitroSDK/include/custom_allocator.h')
-rw-r--r--arm9/lib/NitroSDK/include/custom_allocator.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arm9/lib/NitroSDK/include/custom_allocator.h b/arm9/lib/NitroSDK/include/custom_allocator.h
new file mode 100644
index 00000000..0a42ae13
--- /dev/null
+++ b/arm9/lib/NitroSDK/include/custom_allocator.h
@@ -0,0 +1,13 @@
+#ifndef POKEDIAMOND_CUSTOM_ALLOCATOR_H
+#define POKEDIAMOND_CUSTOM_ALLOCATOR_H
+
+#include "nitro/types.h"
+
+typedef void * (* AllocFunc)(u32 size);
+typedef void (* FreeFunc)(void * ptr);
+
+void* CallCustomAllocator(u32 size);
+void CallCustomDestructor(void * ptr);
+void SetCustomAllocatorAndDestructor(AllocFunc allocator, FreeFunc destructor);
+
+#endif //POKEDIAMOND_CUSTOM_ALLOCATOR_H