aboutsummaryrefslogtreecommitdiff
path: root/base/runtime/default_allocators_general.odin
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-01-29 16:18:38 +0000
committerGitHub <noreply@github.com>2024-01-29 16:18:38 +0000
commitf588593ff15fa13e89bd869a52b2ff9bf9d91341 (patch)
tree8f2c0a32259c405c53396ead12b1c8f3f5c261d0 /base/runtime/default_allocators_general.odin
parenta78f062499c7f0112558872a500904e6fbc6761b (diff)
parenta626adac8e8e0ca0506401cf3376727ad801091c (diff)
Merge pull request #3147 from odin-lang/base-work
`base` library collection work
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
+}