@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user