summaryrefslogtreecommitdiff
path: root/include/malloc.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-02-11 20:12:40 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2018-02-11 20:12:40 -0500
commit590c4b500b9dd37d372a935865aa4df0ab0bf43c (patch)
tree5572d76c91e106e74e1401076f130fb902f6b67b /include/malloc.h
parentbc063b45d05716d1eab283f6d474bcdc601cafde (diff)
parent14a76793e596d612efd273169c4172922c270f13 (diff)
Merge branch 'master' into record_mixing
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);