aboutsummaryrefslogtreecommitdiff
path: root/base/runtime
diff options
context:
space:
mode:
authorKarl Zylinski <karl@zylinski.se>2024-06-18 12:46:50 +0200
committerKarl Zylinski <karl@zylinski.se>2024-06-18 12:48:16 +0200
commit11e586494bb6c7dcdb0cd484711d4e6a9c606e55 (patch)
tree2e3696e0cb9c45ac7d5427fe85ef92d0e060ab2d /base/runtime
parenta619ea3bcdbf170b8eebafde222a9df387284ee4 (diff)
Clarify that the arena in base:runtime shouldn't be used for anything but the default temp allocator. This is done by renaming the file in which it lives, and also by improving the comment above `Arena :: struct {`. This should avoid some confusion where people end up using the Arena in base:runtime because they thought it was the 'default arena'.
Diffstat (limited to 'base/runtime')
-rw-r--r--base/runtime/default_temp_allocator_arena.odin (renamed from base/runtime/default_allocators_arena.odin)3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/runtime/default_allocators_arena.odin b/base/runtime/default_temp_allocator_arena.odin
index 571590f93..ab9f7df4a 100644
--- a/base/runtime/default_allocators_arena.odin
+++ b/base/runtime/default_temp_allocator_arena.odin
@@ -12,7 +12,8 @@ Memory_Block :: struct {
capacity: uint,
}
-// NOTE: This is for internal use, prefer `Arena` from `core:mem/virtual` if necessary
+// NOTE: This is a growing arena that is only used for the default temp allocator.
+// For your own growing arena needs, prefer `Arena` from `core:mem/virtual`.
Arena :: struct {
backing_allocator: Allocator,
curr_block: ^Memory_Block,