aboutsummaryrefslogtreecommitdiff
path: root/base/runtime/default_allocators_general.odin
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-01-28 22:40:46 +0000
committergingerBill <bill@gingerbill.org>2024-01-28 22:40:46 +0000
commit9a16bc5fc59775f3171d47e9d38b0c1fb193108d (patch)
treea118bac68e9a91d32c145386ac3cc8008f13547a /base/runtime/default_allocators_general.odin
parenteee8e0faa266ca5fa049b22d7553a1093405e945 (diff)
Remove `core:os` dependency for `base:runtime`
Diffstat (limited to 'base/runtime/default_allocators_general.odin')
-rw-r--r--base/runtime/default_allocators_general.odin20
1 files changed, 2 insertions, 18 deletions
diff --git a/base/runtime/default_allocators_general.odin b/base/runtime/default_allocators_general.odin
index e3b06af7b..cbaf4d22a 100644
--- a/base/runtime/default_allocators_general.odin
+++ b/base/runtime/default_allocators_general.odin
@@ -1,28 +1,12 @@
-//+build !windows
-//+build !freestanding
-//+build !wasi
-//+build !js
package runtime
-// TODO(bill): reimplement these procedures in the os_specific stuff
-import "core:os"
-
when ODIN_DEFAULT_TO_NIL_ALLOCATOR {
- _ :: os
-
- // mem.nil_allocator reimplementation
default_allocator_proc :: nil_allocator_proc
default_allocator :: nil_allocator
} else when ODIN_DEFAULT_TO_PANIC_ALLOCATOR {
- _ :: os
-
default_allocator_proc :: panic_allocator_proc
default_allocator :: panic_allocator
} else {
-
- default_allocator_proc :: os.heap_allocator_proc
-
- default_allocator :: proc() -> Allocator {
- return os.heap_allocator()
- }
+ default_allocator :: heap_allocator
+ default_allocator_proc :: heap_allocator_proc
}