#zig
0 posts · 1 note · filter on the home page
Learnt an interesting thing about Zig’s SMP allocator. The whole code is very simple, some 200 lines, only deals with smaller objects, reuses but never releases memory it allocates, and defers to slow mmap for bigger objects, anything over 32KiB. Good, but not ideal.
Now, this is Zig. You can easily integrate any C based allocator, and there’s indeed a better one. Did pretty thorough benchmarking. Plan to release a blog post about that soon.