how free() function know how many bytes to release or free?
it don't actually.
o.s will maintain that list.
generally malloc will add a header at the starting location, on how many bytes its going to allocate. Based on this free will work.
we don't know how it works.
Back To Top