aboutsummaryrefslogtreecommitdiff
path: root/mem/include/mem.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-07-14 09:16:39 -0700
committer3gg <3gg@shellblade.net>2025-07-14 09:16:39 -0700
commit09166d46d6a30c1d431cc8371325d4fc8ae76162 (patch)
tree745d845daffd500e0d55bc1871ceb0131f9e0457 /mem/include/mem.h
parentcc945cad053cd36d67ee5daf50a71e212ce2cfe3 (diff)
null instead of 0
Diffstat (limited to 'mem/include/mem.h')
-rw-r--r--mem/include/mem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/mem/include/mem.h b/mem/include/mem.h
index 224b069..3050ba8 100644
--- a/mem/include/mem.h
+++ b/mem/include/mem.h
@@ -68,13 +68,13 @@
68/// Allocate a new chunk of N blocks. 68/// Allocate a new chunk of N blocks.
69/// Return a pointer to the first block of the chunk. 69/// Return a pointer to the first block of the chunk.
70/// When there is no space left in the allocator, allocation can either trap 70/// When there is no space left in the allocator, allocation can either trap
71/// (default) or gracefully return 0. 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) mem_alloc_(&(MEM)->mem, num_blocks)
75 75
76/// Free the chunk. 76/// Free the chunk.
77/// The chunk pointer is conveniently set to 0. 77/// The chunk pointer is conveniently set to null.
78#define mem_free(MEM, CHUNK) mem_free_(&(MEM)->mem, (void**)CHUNK) 78#define mem_free(MEM, CHUNK) mem_free_(&(MEM)->mem, (void**)CHUNK)
79 79
80/// Return a pointer to a chunk given the chunk's handle. 80/// Return a pointer to a chunk given the chunk's handle.