3 ms·
Such linear allocators are not too uncommon in embedded / static allocation context, but one definitely needs to know how they work. So first thought was you di
by throwbadubadu 4y ago
Such linear allocators are not too uncommon in embedded / static allocation context, but one definitely needs to know how they work. So first thought was you didn't read the docs, but docs do not clearly state that behavoour that is ugly (:
- masklinn 4y ago> So first thought was you didn't read the docs, but docs do not clearly state that behavoour that is ugly (: Yep, neither the name nor what little documentation there is a are really helpful, and that looks to be a long-standing issue (https://github.com/ziglang/zig/issues/3049 https://github.com/ziglang/zig/issues/3049). Seems to me like this allocator should be renamed something like "FixedBufferBumpAllocator", which: - leaves room for other fixed-buffer allocators (e.g. bitmap, slabs) - spell out that there's something of note about the allocator, whose drawbacks the developer either would already be aware of or would be able to look up easily
- shp0ngle 4y agoThere are basically no docs for this allocator.