mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-21 13:55:45 +00:00
Add mem.Allocator_Mode.Query_Features, mem.Allocator_Mode_Set, mem.query_features`
This commit is contained in:
@@ -194,6 +194,13 @@ heap_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode,
|
||||
return aligned_alloc(size, alignment);
|
||||
}
|
||||
return aligned_resize(old_memory, old_size, size, alignment);
|
||||
|
||||
case .Query_Features:
|
||||
set := (^mem.Allocator_Mode_Set)(old_memory);
|
||||
if set != nil {
|
||||
set^ = {.Alloc, .Free, .Resize, .Query_Features};
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
Reference in New Issue
Block a user