Update runtime printing code

This commit is contained in:
gingerBill
2018-10-11 18:19:29 +01:00
parent 627c91124a
commit 0971a59493
4 changed files with 73 additions and 22 deletions
+6
View File
@@ -294,6 +294,12 @@ pool_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
pool_free_all(pool);
case Allocator_Mode.Resize:
panic("Allocator_Mode.Resize is not supported for a pool");
if old_size >= size {
return old_memory;
}
ptr := pool_alloc(pool, size);
copy(ptr, old_memory, old_size);
return ptr;
}
return nil;
}