How Can I Get See A Memory Map For An Executable

Ian Lance Taylor ian@airs.com
Tue Nov 15 15:35:00 GMT 2005


Steven Woody <narkewoody@gmail.com> writes:

> thank you, but neither of these commands can clearly print size of each segment
> ( such as heap, bss, text). but, thanks anyway.

The size program will print the size of the text and bss sections.

The size of the heap program is determined at runtime.  I do not know
of any program which can determine it statically.

> >> another relative question is, where the 'new' operator get memory from? the
> >> global heap? does it same with what 'malloc' get from?
> >
> > In general, the answers are yes and yes.
> 
> thanks.  could you also tell me what's the difference between local heap and
> global heap, i can not recall where i heard the the terms.

I don't know where you heard the terms either.  On a typical Unix (or
GNU/Linux) system, programs have only one heap.

Ian



More information about the Gcc-help mailing list