diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin index 7ef094bc1..cc21b84ef 100644 --- a/core/mem/allocators.odin +++ b/core/mem/allocators.odin @@ -116,6 +116,8 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, if scratch.data == nil { DEFAULT_SCRATCH_BACKING_SIZE :: 1<<22; + assert(context.allocator.procedure != scratch_allocator_proc && + context.allocator.data != allocator_data); scratch_allocator_init(scratch, make([]byte, 1<<22)); } diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 1fce88ce9..af9e606cb 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -1836,4 +1836,3 @@ main :: proc() { soa_struct_layout(); } } -