Re:Untangling Lifetimes: The Arena Allocator
by doesntmeananyth on Monday October 31, 2022 @09:41AM
(#33405558)
You may also be interested in this comment thread, where the author explains his opinion on Zig's approach to allocators:
https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
Re:Untangling Lifetimes: The Arena Allocator
by jcparkyn on Monday October 31, 2022 @08:05PM
(#33415187)
I don't use zig, but it seems to me that functions can choose exactly which type of allocator they want to accept (just by changing the type of the allocator parameter), making his point invalid.
https://ziglang.org/documentation/0.9.1/#Choosing-an-Allocat...
There is even an arena allocator provided (amongst others) by the std lib.