Test reserving a massive arena
This commit is contained in:
@@ -19,6 +19,18 @@ TestFuncResult test_arena_init(void) {
|
||||
return wapp_tester_result(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_init_succeeds_when_reserving_very_large_size(void) {
|
||||
Arena *large_arena = NULL;
|
||||
u64 capacity = 512ull * 1024ull * 1024ull * 1024ull;
|
||||
bool result =
|
||||
wapp_mem_arena_init(&large_arena, capacity, WAPP_MEM_ALLOC_RESERVE, false);
|
||||
if (result) {
|
||||
wapp_mem_arena_destroy(&large_arena);
|
||||
}
|
||||
|
||||
return wapp_tester_result(result);
|
||||
}
|
||||
|
||||
TestFuncResult test_arena_alloc_succeeds_when_within_capacity(void) {
|
||||
array = wapp_mem_arena_alloc(arena, count * sizeof(i32));
|
||||
bool result = array != NULL;
|
||||
|
Reference in New Issue
Block a user