[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Heap and Statitic data segment at runtime




Hi,
                   
I am trying to figure out where I can dynamically figure out information 
about the Heap.  The /proc/self/stat gives information about the stack
like where the stack begins and the size (at least that's what it looks
like). 

But I can't find out where to find that information about the heap (ie,
where it begins and the size of the heap).  I need similiar information
about the static data area which I can hopefully glean from the /proc
because I have to do it at run time.
                   
I have found information about /proc/self/maps.  I have found that the
second and third entries are the static data segment and the heap segment
respectively.  I have been told to look at the permission to find out if
the third entry is the heap if it has read/write/execute priveledge then
it is the heap.  But I have found instances where this is not the case.

Can you please tell me how I can get the heap address and the static data
segment for a program at runtime?

Thanks,

Usman Abbasi
uabbasi@cs.utexas.edu


-
Linux-mm-www: builders list for the Linux-MM website
Archive:      http://humbolt.nl.linux.org/lists/
Web site:     http://www.linux.eu.org/Linux-MM/