Update allocator interface
Release / release (push) Successful in 4s

This commit is contained in:
2026-09-30 22:24:46 +01:00
parent cd93b2e479
commit df03b48319
8 changed files with 75 additions and 32 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
#define TEMP_BUF_SIZE (40 + sizeof(i32) * 8)
wp_intern u8 temp_buf[TEMP_BUF_SIZE] = {};
wp_intern WpAllocator temp_allocator = {};
wp_intern WpAllocator temp_allocator = {};
WpTestFuncResult test_arena_allocator(void) {
WpAllocator allocator = wpMemArenaAllocatorInit(4096);
@@ -45,7 +45,7 @@ WpTestFuncResult test_arena_allocator_temp_begin(void) {
i32 *num1 = (i32 *)wpMemAllocatorAlloc(&temp_allocator, sizeof(i32));
b8 result = num1 != NULL;
wpMemArenaAllocatorTempBegin(&temp_allocator);
wpMemAllocatorTempBegin(&temp_allocator);
i32 *num2 = (i32 *)wpMemAllocatorAlloc(&temp_allocator, sizeof(i32));
result = result && num2 != NULL;
i32 *num3 = (i32 *)wpMemAllocatorAlloc(&temp_allocator, sizeof(i32));
@@ -55,7 +55,7 @@ WpTestFuncResult test_arena_allocator_temp_begin(void) {
}
WpTestFuncResult test_arena_allocator_temp_end(void) {
wpMemArenaAllocatorTempEnd(&temp_allocator);
wpMemAllocatorTempEnd(&temp_allocator);
i32 *num1 = (i32 *)wpMemAllocatorAlloc(&temp_allocator, sizeof(i32));
b8 result = num1 != NULL;
i32 *num2 = (i32 *)wpMemAllocatorAlloc(&temp_allocator, sizeof(i32));