Replaced opaque bit-shifts with readable constants for memory units

This commit is contained in:
hikari
2022-12-24 08:27:15 +02:00
parent 56e050fbc9
commit d904ae5191
5 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
s := (^Scratch_Allocator)(allocator_data)
if s.data == nil {
DEFAULT_BACKING_SIZE :: 1<<22
DEFAULT_BACKING_SIZE :: 4 * Megabyte
if !(context.allocator.procedure != scratch_allocator_proc &&
context.allocator.data != allocator_data) {
panic("cyclic initialization of the scratch allocator with itself")