diff options
| author | 3gg <3gg@shellblade.net> | 2026-04-05 15:01:30 -0700 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2026-04-05 15:01:30 -0700 |
| commit | af26c0503d698b7824055dc98207d6252d9875cf (patch) | |
| tree | d3940ee0909fce290963dc26671fc6ad69e05cda | |
| parent | 51cb3dca28db17a1975cc9e04b6c75d2c89715c2 (diff) | |
| -rw-r--r-- | mem/include/mem.h | 3 |
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. |
