From e153be0be2fb8df6656292daab3fa59963c76737 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Tue, 13 Feb 2024 17:51:51 -0800 Subject: Let memory allocators trap by default when attempting to allocate beyond capacity. --- mem/test/mem_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mem/test') 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) { TEST_CASE(mem_allocate_beyond_max_size) { test_mem mem; mem_make(&mem); + mem_enable_traps(&mem, false); // Fully allocate the mem. for (int i = 0; i < NUM_BLOCKS; ++i) { -- cgit v1.2.3