3 ms·
The fun part here is that most allocators already keep the size of the chunk within the header of the chunk, before the pointer they return to the caller of mal
by nine_k 2y ago
The fun part here is that most allocators already keep the size of the chunk within the header of the chunk, before the pointer they return to the caller of malloc(3). (Yes, jemalloc does not, it keeps the size info in a different way.) BTW I mentioned this as a master's graduation project, not a realistic way forward, because, well, it's not needed.
I'd say that C will lose relevance slowly, more and more, as much as Zig will gain relevance, hopefully to the point of becoming the default choice, and having key parts of Linux kernel ported to it. Not Rust, which mostly replaces C++; even though it can venture on the C territory, its not comfortable nor seamless there. Zig is so seamless, it can even compile your C code along the way. It can do gnarly stuff like handling memory-mapped control registers with relative ease, and with much fewer footguns than C.
C is old, and its age shows. It needs to gradually retire, the way Fortran-77 did.
- KingLancelot 2y ago[dead]
- Koshkin 2y ago> C will lose relevance slowly, more and more, as much as Zig will gain relevance I have felt a bout of nostalgia for the years past reading this.