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 /mem/test/mem_test.c | |
parent | 84bdfa4a23f5b8daa7921541b007518bc634be0f (diff) |
Let memory allocators trap by default when attempting to allocate beyond capacity.
Diffstat (limited to 'mem/test/mem_test.c')
-rw-r--r-- | mem/test/mem_test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mem/test/mem_test.c b/mem/test/mem_test.c index 2f242c3..d3c43b9 100644 --- a/mem/test/mem_test.c +++ b/mem/test/mem_test.c | |||
@@ -67,6 +67,7 @@ TEST_CASE(mem_fill_then_free) { | |||
67 | TEST_CASE(mem_allocate_beyond_max_size) { | 67 | TEST_CASE(mem_allocate_beyond_max_size) { |
68 | test_mem mem; | 68 | test_mem mem; |
69 | mem_make(&mem); | 69 | mem_make(&mem); |
70 | mem_enable_traps(&mem, false); | ||
70 | 71 | ||
71 | // Fully allocate the mem. | 72 | // Fully allocate the mem. |
72 | for (int i = 0; i < NUM_BLOCKS; ++i) { | 73 | for (int i = 0; i < NUM_BLOCKS; ++i) { |