News for hackers. Stuff that matters.
Re:The Horror in the Standard Library by kabdib on Saturday May 06, 2017 @10:56AM (#14280500)
Knowing a size and being forced to retain a size are different things. Here's a trivial example (imagine a system to process compressed audio data):

(1) receive packet: compute actual size, allocate buffer, expand data into it, start DMA to a speaker or something

(2) DMA-done: free the buffer

There, I didn't need the size on the free. There are many, many many similar cases, in fact these cases probably dominate.

Re:The Horror in the Standard Library by nly on Saturday May 06, 2017 @03:43PM (#14281885)
Both your speaker driver and your application code still needed to keep track of the buffer size. calling free(size) on your buffer would require no extra overhead