Possible Duplicates:
How does delete work in C++?
C programming : How does free know how much to free?
For every dynamic memory allocation, using 'malloc / new', we have methods, 'free / delete' to free the allocated memory.
My question is if the memory allocation size is decieded at runtime and the memory locations not being contiguous, how does these memory freeing methods know how much memory to free and what are the memory locations to be cleared ?
What makes these functions work if we are passing them only a pointer to single location ?