summaryrefslogtreecommitdiff
path: root/include/malloc.h
diff options
context:
space:
mode:
authorCameron Hall <camthesaxman@users.noreply.github.com>2017-11-11 15:48:17 -0600
committerGitHub <noreply@github.com>2017-11-11 15:48:17 -0600
commit558bf2f7d0c9be70ec0da4b9ef28c105c5d11622 (patch)
tree232d44774e91c44ac08b366aa5186593ebe00d62 /include/malloc.h
parentaf197ccd3bd62fab813154dc4311e65f9992a676 (diff)
parent32c7d4f252acf8cc9dc42d50da046c4b3f0beb16 (diff)
Merge pull request #104 from DizzyEggg/decompile_battle_7
Decompile battle 7
Diffstat (limited to 'include/malloc.h')
-rw-r--r--include/malloc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/malloc.h b/include/malloc.h
index f3a731797..003ee1f03 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -5,6 +5,12 @@
#define calloc(ct, sz) AllocZeroed((ct) * (sz))
#define free Free
+#define FREE_AND_SET_NULL(ptr) \
+{ \
+ free(ptr); \
+ ptr = NULL; \
+}
+
extern u8 gHeap[];
void *Alloc(u32 size);
void *AllocZeroed(u32 size);