| Gary R. Hook 2005-04-27, 5:58 pm |
| Kamal R. Prasad wrote:
> There is a memory map segment-wise in /usr/include/var/seg.h.
> Can someone tell me how to locate allocated/unallocated spaces in the process heap?
> Solaris/Linux use avl trees which can be parsed to detrmine valid/invalid addresses.
There are no allocated/unallocated spaces in the process heap.
The heap is contiguous, and grows from the beginning of the data region
(e.g. 0x20000000 in default 32-bit mode) to the break value. If the
loader puts private modules into the process data segment, the heap
grows around those values. That space then becomes owned by the loader,
but considered it "allocated" to the process. IOW, then, the break
value is the only thing you care about.
--
Gary R. Hook
________________________________________
________________________________
Vocatus atque non vocatus deus aderit
|