diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2017-11-02 18:19:49 +0100 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2017-11-02 18:19:49 +0100 |
commit | 5243285ab2cbf895f28e9866e3f5671326422348 (patch) | |
tree | 1f5c7d07dc5c9e6c0660906b0174f7f682767992 /include/malloc.h | |
parent | 63210c07897e86953bf093397eee5a33e95b8c91 (diff) |
start working on battle 7
Diffstat (limited to 'include/malloc.h')
-rw-r--r-- | include/malloc.h | 6 |
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); |