aboutsummaryrefslogtreecommitdiff
path: root/mem/include
diff options
context:
space:
mode:
Diffstat (limited to 'mem/include')
-rw-r--r--mem/include/mem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/mem/include/mem.h b/mem/include/mem.h
index 3050ba8..d669f2d 100644
--- a/mem/include/mem.h
+++ b/mem/include/mem.h
@@ -71,7 +71,8 @@
71/// (default) or gracefully return null. Call mem_enable_traps() to toggle this 71/// (default) or gracefully return null. Call mem_enable_traps() to toggle this
72/// behaviour. 72/// behaviour.
73/// New chunks are conveniently zeroed out. 73/// New chunks are conveniently zeroed out.
74#define mem_alloc(MEM, num_blocks) mem_alloc_(&(MEM)->mem, num_blocks) 74#define mem_alloc(MEM, num_blocks) \
75 (__typeof__((MEM)->object[0])*)mem_alloc_(&(MEM)->mem, num_blocks)
75 76
76/// Free the chunk. 77/// Free the chunk.
77/// The chunk pointer is conveniently set to null. 78/// The chunk pointer is conveniently set to null.