points by OskarS 4 days ago | 0 comments
I don't agree. Zig allocators require the size of the allocation (technically they take a slice, but a slice is ptr + size), as does the C++ polymorphic allocator, as does many allocator interfaces in many libraries (see for instance the allocator interface in Lua, my personal favorite C interface for memory allocation [0]). Clearly having it as a correctness requirement works just fine.
And there also bugs for zig. So hint - fine. Trust it? Not sure. Every allocator is different and can be swapped