public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Aneesh Bhasin <contact.aneesh@gmail.com>
Cc: linux-newbie <linux-newbie@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: smap output - unnamed entries and heap
Date: Tue, 15 Mar 2011 09:14:12 -0700	[thread overview]
Message-ID: <20110315091412.de6eb63c.rdunlap@xenotime.net> (raw)
In-Reply-To: <AANLkTik3N5j74eWastminNZLevPqoSCEiVCrX1vP66_k@mail.gmail.com>

On Tue, 15 Mar 2011 14:31:50 +0530 Aneesh Bhasin wrote:

> Hi All,
> 
> My apologies if this is not the right place for these type of
> questions - I do not know of a better place to ask this.
> 
> I am trying to take out some memory figures from the /proc/<pid>/smaps
> interface (linux v2.6.35). However, I could not find what do the
> entries that have no name associated to them (no library path or
> binary path with these entries) mean. So, I wrote a test C program
> that allocates 100MB of memory (using malloc) and then writes to it in
> chunks of 10MB. I could see that the 'Size' and 'RSS' of one of the
> unnamed entries was increasing in accordance with the code, but there
> were several other such unnamed sections too - is there a way to know
> what and where do they come from.
> 
> Also, I could see that for some process the smap interface was showing
> a '[heap]' entry but not for all - e.g. for my above test case, there
> was no '[heap]' entry, although I assumed the malloc should have
> reflected in the [heap]. Can someone please tell me (or point me in
> the right direction) why is heap entry there only for some processes ?
> 
> Thanks in advance for any help..

Did you look at Documentation/filesystems/proc.txt ?
It has some info on smaps and maps.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2011-03-15 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15  9:01 smap output - unnamed entries and heap Aneesh Bhasin
2011-03-15 16:14 ` Randy Dunlap [this message]
2011-03-16  5:19   ` Aneesh Bhasin
2011-03-16 14:09     ` Pádraig Brady
2011-03-17 11:46       ` Aneesh Bhasin
2011-03-17 22:22         ` Jérôme Pouiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110315091412.de6eb63c.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=contact.aneesh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox