Where does memory dynamically allocated reside?

Posted by Summer_More_More_Tea on Stack Overflow See other posts from Stack Overflow or by Summer_More_More_Tea
Published on 2010-04-09T08:46:13Z Indexed on 2010/04/09 8:53 UTC
Read the original article Hit count: 206

Hello everyone:

We know that malloc() and new operation allocate memory from heap dynamically, but where does heap reside? Does each process have its own private heap in the namespace for dynamic allocation or the OS have a global one shared by all the processes. What's more, I read from a textbook that once memory leak occurs, the missing memory cannot be reused until next time we restart our computer. Is this thesis right? If the answer is yes, how can we explain it?

Thanks for your reply.

Regards.

© Stack Overflow or respective owner

Related posts about dynamic-memory-allocation

Related posts about operating-system