summaryrefslogtreecommitdiff
path: root/include/gamealloc.h
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-11-22 23:55:05 -0300
committerGitHub <noreply@github.com>2023-11-23 13:55:05 +1100
commit506e2155474b1914fe93f070c55debdeaf6df0a6 (patch)
tree5ffab32ee39bb1cafc8803caafd1030ff72f93ef /include/gamealloc.h
parent5ef277df2db5dd54c02c098ec88777f63680f6c3 (diff)
Yet another header cleanup (#1508)
* lights.c * z64skin_matrix.h * Move out some stuff from macros.h * gamealloc.h * move most transition functions to z64transition.h * z64lib.h * `include` cleanup on transition files * z_overlay cleanup * z64malloc.h * format * forgot to remove those * forgot this * fix borken includes
Diffstat (limited to 'include/gamealloc.h')
-rw-r--r--include/gamealloc.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/gamealloc.h b/include/gamealloc.h
new file mode 100644
index 000000000..ad97415ea
--- /dev/null
+++ b/include/gamealloc.h
@@ -0,0 +1,24 @@
+#ifndef GAMEALLOC_H
+#define GAMEALLOC_H
+
+#include "ultra64.h"
+
+typedef struct GameAllocEntry {
+ /* 0x0 */ struct GameAllocEntry* next;
+ /* 0x4 */ struct GameAllocEntry* prev;
+ /* 0x8 */ size_t size;
+ /* 0xC */ u32 unk_0C;
+} GameAllocEntry; // size = 0x10
+
+typedef struct GameAlloc {
+ /* 0x00 */ GameAllocEntry base;
+ /* 0x10 */ GameAllocEntry* head;
+} GameAlloc; // size = 0x14
+
+void GameAlloc_Log(GameAlloc* this);
+void* GameAlloc_Malloc(GameAlloc* this, size_t size);
+void GameAlloc_Free(GameAlloc* this, void* data);
+void GameAlloc_Cleanup(GameAlloc* this);
+void GameAlloc_Init(GameAlloc* this);
+
+#endif