diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-08-06 14:14:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-06 14:14:33 -0400 |
| commit | bd0c96e41818de39d243604f2a56bdee779956f2 (patch) | |
| tree | a26ed55cebc7cf7b7dfcedaf617e8f35cf1d15e5 /include | |
| parent | 49676377a38a3dfd2d6a50e885d7fb814e1e377b (diff) | |
`gamealloc.c` (#33)
* C file
* match file
* review
Diffstat (limited to 'include')
| -rw-r--r-- | include/gamealloc.h | 23 | ||||
| -rw-r--r-- | include/malloc.h | 2 |
2 files changed, 19 insertions, 6 deletions
diff --git a/include/gamealloc.h b/include/gamealloc.h index 5c4d0c8..2d7aa9d 100644 --- a/include/gamealloc.h +++ b/include/gamealloc.h @@ -2,11 +2,24 @@ #define GAMEALLOC_H #include "ultra64.h" +#include "unk.h" -// void func_800D3720_jp(); -// void gamealloc_malloc(); -// void gamealloc_free(); -// void gamealloc_cleanup(); -// void gamealloc_init(); +typedef struct GameAllocEntry { + /* 0x0 */ struct GameAllocEntry* next; + /* 0x4 */ struct GameAllocEntry* prev; + /* 0x8 */ size_t size; + /* 0xC */ UNK_TYPE1 unk_0C[0x4]; +} GameAllocEntry; // size = 0x10 + +typedef struct GameAlloc { + /* 0x00 */ GameAllocEntry base; + /* 0x10 */ GameAllocEntry* head; +} GameAlloc; // size = 0x14 + +void func_800D3720_jp(GameAlloc* this); +void* gamealloc_malloc(GameAlloc* this, size_t size); +void gamealloc_free(GameAlloc* this, void* ptr); +void gamealloc_cleanup(GameAlloc* this); +void gamealloc_init(GameAlloc* this); #endif diff --git a/include/malloc.h b/include/malloc.h index 5a94816..dfc2bc4 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -3,7 +3,7 @@ #include "ultra64.h" -// void malloc(); +void* malloc(size_t size); void* malloc_r(size_t size); // void realloc(); void free(void* ptr); |
