aboutsummaryrefslogtreecommitdiff
path: root/base/runtime/default_allocators_general.odin
diff options
context:
space:
mode:
Diffstat (limited to 'base/runtime/default_allocators_general.odin')
-rw-r--r--base/runtime/default_allocators_general.odin12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/runtime/default_allocators_general.odin b/base/runtime/default_allocators_general.odin
new file mode 100644
index 000000000..cbaf4d22a
--- /dev/null
+++ b/base/runtime/default_allocators_general.odin
@@ -0,0 +1,12 @@
+package runtime
+
+when ODIN_DEFAULT_TO_NIL_ALLOCATOR {
+ default_allocator_proc :: nil_allocator_proc
+ default_allocator :: nil_allocator
+} else when ODIN_DEFAULT_TO_PANIC_ALLOCATOR {
+ default_allocator_proc :: panic_allocator_proc
+ default_allocator :: panic_allocator
+} else {
+ default_allocator :: heap_allocator
+ default_allocator_proc :: heap_allocator_proc
+}