Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
heap.c
Go to the documentation of this file.
1#include "common.h"
2
5
9
10void* general_heap_malloc(s32 size) {
11 return _heap_malloc(&heap_generalHead, size);
12}
13
14void* general_heap_malloc_tail(s32 size) {
16}
17
18s32 general_heap_free(void* data) {
19 return _heap_free(&heap_generalHead, data);
20}
21
24 return -1;
25 } else {
26 return 0;
27 }
28}
29
30s32 func_8002ACDC(void) {
31 return 0;
32}
33
34void* heap_malloc(s32 size) {
36 return general_heap_malloc(size);
37 } else {
38 return _heap_malloc(&heap_battleHead, size);
39 }
40}
41
42s32 heap_free(void* data) {
44 return _heap_free(&heap_battleHead, data);
45 } else {
46 return general_heap_free(data);
47 }
48}
49
52 return -1;
53 }
54 return 0;
55}
56
57void* collision_heap_malloc(s32 size) {
59 return _heap_malloc(&heap_collisionHead, size);
60 } else {
61 return _heap_malloc(&heap_battleHead, size);
62 }
63}
64
65s32 collision_heap_free(void* data) {
67 return _heap_free(&heap_battleHead, data);
68 } else {
69 return _heap_free(&heap_collisionHead, data);
70 }
71}
#define general_heap_malloc
@ CONTEXT_WORLD
Definition enums.h:3529
void * _heap_malloc(HeapNode *head, u32 size)
Definition 43F0.c:78
void * _heap_malloc_tail(HeapNode *head, u32 size)
Definition 43F0.c:153
u32 _heap_free(HeapNode *heapNodeList, void *addrToFree)
Definition 43F0.c:221
HeapNode * _heap_create(HeapNode *addr, u32 size)
Definition 43F0.c:63
s32 collision_heap_create(void)
Definition heap.c:50
s32 heap_free(void *data)
Definition heap.c:42
HeapNode * general_heap_create(void)
Definition heap.c:6
HeapNode heap_collisionHead
Definition heaps2.c:7
s32 general_heap_free(void *data)
Definition heap.c:18
HeapNode heap_generalHead
Definition heaps3.c:3
void * collision_heap_malloc(s32 size)
Definition heap.c:57
s32 battle_heap_create(void)
Definition heap.c:22
s32 collision_heap_free(void *data)
Definition heap.c:65
s32 func_8002ACDC(void)
Definition heap.c:30
void * general_heap_malloc_tail(s32 size)
Definition heap.c:14
void * heap_malloc(s32 size)
Definition heap.c:34
#define COLLISION_HEAP_SIZE
Definition macros.h:111
#define BATTLE_HEAP_SIZE
Definition macros.h:114
#define GENERAL_HEAP_SIZE
Definition macros.h:112
GameStatus * gGameStatusPtr
Definition main_loop.c:32
HeapNode heap_battleHead