Re: How Can I Get See A Memory Map For An Executable

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

 



Ian Lance Taylor <ian@xxxxxxxx> writes:

> Steven Woody <narkewoody@xxxxxxxxx> writes:
>
>> i want to check in my C++ program, what variable is allocated in where. is
>> there such a tool?
>
> I don't know if it will much, but the GNU linker supports a -Map
> option.  See the documentation.  You can also use nm or objdump -t or
> readelf -s to see where symbols are in the fully linked executable.

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

>
>> 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.


>
> Ian
>

-- 
steven woody (id: narke)

John McFarland: Hey, what are you guys doing?
Alex: Get the fuck out and don't come back! Some heavy shit's going down! 

	- Elephant (2003)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux