summaryrefslogtreecommitdiff
path: root/arm9/lib/NitroSDK/include/custom_allocator.h
diff options
context:
space:
mode:
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