News for hackers. Stuff that matters.
Re:Why Does Calloc Exist? by Sharlin on Sunday November 13, 2022 @06:48AM (#33582177)
In the real world, musl would call its own `malloc` and can presumably trust that `((size_t *)p)[-1]` is valid and contains the block metadata (and the compiler can't assume it isn't valid), whereas the godbolt snippet calls libc's `malloc` which is a black box to outside callers. Or maybe LLVM can even deduce that the low bits are always zero on `libc`?

There are no comments on this comment yet.