public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Query regarding anon symbols in the output of pmap command
@ 2011-09-09 13:55 sanshivp
  2011-09-09 20:55 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: sanshivp @ 2011-09-09 13:55 UTC (permalink / raw)
  To: gcc-help

Hi All,

My application is completely written in C++.

While running my application I run the pmap command on the PID of my application. In the output, there were a lot of memory address ranges which are marked against as anon. With a little bit of googling I found out that these addresses might belong to BSS section of process's memory.

Now my question is : 

"Is there any compiler option or any coding style where the number of such anon symbols can be reduced...?"

Any help/suggestions regarding this would be very helpful for me.

Thanks & Regards,
Shivaprasada.M.A

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Query regarding anon symbols in the output of pmap command
  2011-09-09 13:55 Query regarding anon symbols in the output of pmap command sanshivp
@ 2011-09-09 20:55 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-09-09 20:55 UTC (permalink / raw)
  To: sanshivp; +Cc: gcc-help

sanshivp@gmail.com writes:

> My application is completely written in C++.
>
> While running my application I run the pmap command on the PID of my application. In the output, there were a lot of memory address ranges which are marked against as anon. With a little bit of googling I found out that these addresses might belong to BSS section of process's memory.
>
> Now my question is : 
>
> "Is there any compiler option or any coding style where the number of such anon symbols can be reduced...?"

The compiler will normally create just one anonymous memory range
holding all the BSS variables.

I suspect that you are seeing anonymous memory allocated using mmap.
That is how malloc works on many systems.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-09 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-09 13:55 Query regarding anon symbols in the output of pmap command sanshivp
2011-09-09 20:55 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).