aboutsummaryrefslogtreecommitdiff
path: root/core/mem
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2025-06-14 12:25:04 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2025-06-15 12:34:15 -0400
commita4771ce1b584cb426dd20f7f11e3148157b3ebb2 (patch)
treeb3c51d7c231a97c2a2f13aa98968c14579488559 /core/mem
parent21a17c1ae6f03848dd7f5f8eaee6174bedf09403 (diff)
mem: Clarify what happens when you free out-of-order in a `Small_Stack`
Diffstat (limited to 'core/mem')
-rw-r--r--core/mem/allocators.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/mem/allocators.odin b/core/mem/allocators.odin
index f62ef4fb4..dd5575c37 100644
--- a/core/mem/allocators.odin
+++ b/core/mem/allocators.odin
@@ -1248,7 +1248,10 @@ Small stack allocator.
The small stack allocator is just like a stack allocator, with the only
difference being an extremely small header size. Unlike the stack allocator,
-small stack allows out-of order freeing of memory.
+small stack allows out-of order freeing of memory, with the stipulation that
+all allocations made after the freed allocation will become invalidated upon
+following allocations as they will begin to overwrite the memory formerly used
+by the freed allocation.
The memory is allocated in the backing buffer linearly, from start to end.
Each subsequent allocation will get the next adjacent memory region.