diff options
author | 3gg <3gg@shellblade.net> | 2024-02-13 17:51:51 -0800 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-02-13 17:51:51 -0800 |
commit | e153be0be2fb8df6656292daab3fa59963c76737 (patch) | |
tree | 7cca3fc134553017cb3c259db1dca33c98556109 /mempool/test | |
parent | 84bdfa4a23f5b8daa7921541b007518bc634be0f (diff) |
Let memory allocators trap by default when attempting to allocate beyond capacity.
Diffstat (limited to 'mempool/test')
-rw-r--r-- | mempool/test/mempool_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mempool/test/mempool_test.c b/mempool/test/mempool_test.c index d5ed1ea..6c48a2a 100644 --- a/mempool/test/mempool_test.c +++ b/mempool/test/mempool_test.c | |||
@@ -67,6 +67,7 @@ TEST_CASE(mempool_fill_then_free) { | |||
67 | TEST_CASE(mempool_allocate_beyond_max_size) { | 67 | TEST_CASE(mempool_allocate_beyond_max_size) { |
68 | test_pool pool; | 68 | test_pool pool; |
69 | mempool_make(&pool); | 69 | mempool_make(&pool); |
70 | mempool_enable_traps(&pool, false); | ||
70 | 71 | ||
71 | // Fully allocate the pool. | 72 | // Fully allocate the pool. |
72 | for (int i = 0; i < NUM_BLOCKS; ++i) { | 73 | for (int i = 0; i < NUM_BLOCKS; ++i) { |