mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-13 09:22:22 -07:00
20 lines
458 B
Odin
20 lines
458 B
Odin
//+build !windows
|
|
//+build !freestanding
|
|
//+build !wasi
|
|
package runtime
|
|
|
|
when ODIN_DEFAULT_TO_NIL_ALLOCATOR {
|
|
// mem.nil_allocator reimplementation
|
|
default_allocator_proc :: nil_allocator_proc
|
|
default_allocator :: nil_allocator
|
|
} else {
|
|
// TODO(bill): reimplement these procedures in the os_specific stuff
|
|
import "core:os"
|
|
|
|
default_allocator_proc :: os.heap_allocator_proc
|
|
|
|
default_allocator :: proc() -> Allocator {
|
|
return os.heap_allocator()
|
|
}
|
|
}
|