0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std/heap
Justus Klausecker 5363a81a57 std.heap.FixedBufferAllocator: fix end_index memory ordering
This prevents a race between `alloc` and `free` where T1 receives memory
from `alloc` that is semantically about to be freed by T2 and still being
accessed, but the `free` is already visible to T1. Using acquire-release
here guarantees that any `free` is only published after all accesses to
the memory being freed have already happened.

Co-authored-by: Jacob Young <amazingjacob@gmail.com>
History 2026-03-25 11:48:45 +01:00
..
ArenaAllocator.zig std.heap.ArenaAllocator: fix end_index memory ordering 2026-03-25 11:48:43 +01:00
BrkAllocator.zig std.heap.BrkAllocator: fix incorrect assumptions 2026-02-12 16:30:27 -08:00
debug_allocator.zig std.heap.DebugAllocator: make BucketHeader.fromPage() use wrapping arithmetic 2026-02-21 23:39:34 +01:00
FixedBufferAllocator.zig std.heap.FixedBufferAllocator: fix end_index memory ordering 2026-03-25 11:48:45 +01:00
memory_pool.zig MemoryPool: add unmanaged variants and make them the default 2025-11-15 09:30:57 +00:00
PageAllocator.zig std.heap.PageAllocator: avoid mremaps which may reserve potential stack space 2026-02-21 23:39:34 +01:00
SmpAllocator.zig zig libc: implement malloc 2026-02-12 13:14:51 -08:00