N
Hacker Next
new
past
show
ask
show
jobs
submit
login
▲
ArenaAllocators don't play nicely with ArrayLists
(
openmymind.net
)
16 points by
ibobev
6 days ago
|
1 comment
add comment
tynorf 2 hours ago
[-]
FWIW, if you aren’t interleaving other allocations (which includes on other threads), the ArenaAllocator in Zig doesn’t have this problem. If you attempt to resize the most recent allocation, it will do so in place if possible.
https://ziglang.org/documentation/0.16.0/std/#std.heap.Arena...
Rendered at 16:52:58 GMT+0000 (Coordinated Universal Time) with Vercel.
https://ziglang.org/documentation/0.16.0/std/#std.heap.Arena...