12-17-04 12:45 AM
In article <1103188103.928484.50910@c13g2000cwb.googlegroups.com>,
my_gaurav@yahoo.com wrote:
> Hi
>
> Just wanted to know some details about the dynamic memory allocation in
> Unix. When I start process a.out how exactly heap is allocated by the
> kernel and is there any limit on the size of the heap.
Look up "break" in any book or web page on Unix internals.
>
> Another thing is that when I do a free() or delete() the released
> memory is not returned back to kernel ??
Usually true. Since the heap segment can only be grown or shrunk at one
end, the memory could only be returned if it happened to be at the end
of the segment. I think the GNU libc free() checks for this, but most
don't.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
[ Post a follow-up to this message ]
|