Add Arena_Kind.Buffer to core:mem/virtual

This commit is contained in:
gingerBill
2022-10-26 13:37:20 +01:00
parent a5f8c3f692
commit 7d217269b5
2 changed files with 45 additions and 10 deletions
+4
View File
@@ -128,6 +128,10 @@ alloc_from_memory_block :: proc(block: ^Memory_Block, min_size, alignment: uint)
return nil
}
if block == nil {
return nil, .Out_Of_Memory
}
alignment_offset := calc_alignment_offset(block, uintptr(alignment))
size, size_ok := safe_add(min_size, alignment_offset)
if !size_ok {