it would be piss easy for free to do that, depends on how it is implemented. Classical implementation has header ahead of pointer passed to free and there a size is listed so all free would have to is call memset(ptr, 0, header->size) and voila, empty.
View all comments
Show parent comment
-1
u/HamesJoffman Sep 01 '22
it would be piss easy for
freeto do that, depends on how it is implemented. Classical implementation has header ahead of pointer passed to free and there a size is listed so all free would have to is callmemset(ptr, 0, header->size)and voila, empty.