News for hackers. Stuff that matters.
Re:The lost malloc() by OskarS on Wednesday November 04, 2026 @06:29AM (#50364142)
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.

[0]: https://www.lua.org/manual/5.4/manual.html#lua_Alloc

Re:The lost malloc() by 0xdeafbeef on Wednesday November 04, 2026 @07:43AM (#50364784)
https://github.com/microsoft/mimalloc/issues/1423 https://github.com/microsoft/mimalloc/issues/1400

And there also bugs for zig. So hint - fine. Trust it? Not sure. Every allocator is different and can be swapped