diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-04 11:03:21 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-04 11:03:21 +0000 |
| commit | 3fa7dabaa87e99386e469bd5e4badab23f89aaef (patch) | |
| tree | 84933a742d8246b97ec862142ec9579319510bf7 /core/runtime/default_allocators_general.odin | |
| parent | 1980f32bd6636edf7f8a1ba0d0010f23b5292488 (diff) | |
Correctly support `-default-to-nil-allocator` for all platforms
Diffstat (limited to 'core/runtime/default_allocators_general.odin')
| -rw-r--r-- | core/runtime/default_allocators_general.odin | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/core/runtime/default_allocators_general.odin b/core/runtime/default_allocators_general.odin index 6bcfb68ae..5ccd5ceb4 100644 --- a/core/runtime/default_allocators_general.odin +++ b/core/runtime/default_allocators_general.odin @@ -5,19 +5,8 @@ package runtime when ODIN_DEFAULT_TO_NIL_ALLOCATOR { // mem.nil_allocator reimplementation - - default_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode, - size, alignment: int, - old_memory: rawptr, old_size: int, loc := #caller_location) -> ([]byte, Allocator_Error) { - return nil, .None - } - - default_allocator :: proc() -> Allocator { - return Allocator{ - procedure = default_allocator_proc, - data = nil, - } - } + default_allocator_proc :: nil_allocator_proc + default_allocator :: nil_allocator } else { // TODO(bill): reimplement these procedures in the os_specific stuff import "core:os" |