Freeing memory in C or C++

This question already has an answer here:


ANSWERS:


malloc leaves notes that free reads. In particular, it leaves a note that says how many bytes were allocated.



 MORE:


 ? freeing memory using free()
 ? How does C free() work?
 ? What if, memory allocated using malloc is deleted using delete rather than free
 ? C: malloc(), free() and then again malloc() does work same always?
 ? Heap corruption while freeing memory
 ? Heap corruption while freeing memory
 ? Heap corruption while freeing memory
 ? heap corruption detected after normal block(#174)
 ? Heap corruption when trimming delayed free queue
 ? Heap corruption on free(...)