diff options
author | 3gg <3gg@shellblade.net> | 2025-07-14 09:16:39 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2025-07-14 09:16:39 -0700 |
commit | 09166d46d6a30c1d431cc8371325d4fc8ae76162 (patch) | |
tree | 745d845daffd500e0d55bc1871ceb0131f9e0457 /mempool/include | |
parent | cc945cad053cd36d67ee5daf50a71e212ce2cfe3 (diff) |
null instead of 0
Diffstat (limited to 'mempool/include')
-rw-r--r-- | mempool/include/mempool.h | 6 |
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) |