aboutsummaryrefslogtreecommitdiff
path: root/mempool/include
diff options
context:
space:
mode:
Diffstat (limited to 'mempool/include')
-rw-r--r--mempool/include/mempool.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/mempool/include/mempool.h b/mempool/include/mempool.h
index 04d0313..0de7ac6 100644
--- a/mempool/include/mempool.h
+++ b/mempool/include/mempool.h
@@ -64,15 +64,15 @@
64#define mempool_clear(POOL) mempool_clear_(&(POOL)->pool) 64#define mempool_clear(POOL) mempool_clear_(&(POOL)->pool)
65 65
66/// Allocate a new block. 66/// Allocate a new block.
67/// Return 0 if there is no memory left. 67/// Return null if there is no memory left.
68/// When there is no space left in the pool, allocation can either trap 68/// When there is no space left in the pool, allocation can either trap
69/// (default) or gracefully return 0. Call mem_enable_traps() to toggle this 69/// (default) or gracefully return null. Call mem_enable_traps() to toggle this
70/// behaviour. 70/// behaviour.
71/// New blocks are conveniently zeroed out. 71/// New blocks are conveniently zeroed out.
72#define mempool_alloc(POOL) mempool_alloc_(&(POOL)->pool) 72#define mempool_alloc(POOL) mempool_alloc_(&(POOL)->pool)
73 73
74/// Free the block. 74/// Free the block.
75/// The block pointer is conveniently set to 0. 75/// The block pointer is conveniently set to null.
76#define mempool_free(POOL, BLOCK_PTR) \ 76#define mempool_free(POOL, BLOCK_PTR) \
77 assert(*BLOCK_PTR); \ 77 assert(*BLOCK_PTR); \
78 mempool_free_(&(POOL)->pool, (void**)BLOCK_PTR) 78 mempool_free_(&(POOL)->pool, (void**)BLOCK_PTR)