![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Memory usage in Solaris - memory not freed? | gewurtz | SUN Solaris | 3 | 01-06-2009 12:06 PM |
| malloc gives the same memory to two different nodes. How to deal with it? | cdbug | High Level Programming | 2 | 01-04-2009 09:01 PM |
| mv files still in use - space not freed | apra143 | Filesystems, Disks and Memory | 4 | 01-08-2008 07:47 PM |
| Memory allocated | baanprog | SUN Solaris | 1 | 05-04-2006 11:06 AM |
| malloc | rajashekaran | High Level Programming | 2 | 09-30-2002 06:24 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Why memory allocated through malloc should be freed ?
Actually for a process to run it needs text, stack , heap and data segments. All these find a place in the physical memory.
Out of these 4 only heap does exist after the termination of the process that created it. I want to know the exact reason why this happens. Also why the other process need to access the heap of my process. If the other processes compete for the heap that my process has consumed then there wont be need of an IPC mechanism (like my process will put the information in the heap and give that address to the peer process to have the info shared) ... My question is really simple, I am not freeing the text , data and stack segments used by my process, then y should i do it for heap alone? ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|