linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: edjard@ufam.edu.br
To: linux-kernel@vger.kernel.org
Cc: Mauricio.Lin@indt.org.br, Allan.Bezerra@indt.org.br,
	mauriciolin@bol.com.br, ajsb@dcc.fua.br
Subject: 
Date: Fri, 14 Nov 2003 22:49:45 -0200 (BRST)	[thread overview]
Message-ID: <3093.200.208.225.32.1068857385.squirrel@webmail.ufam.edu.br> (raw)

Hello All,

We have tried to find out answer to our questions at the kernelnewbies
list, but after many mails we had no conclusive opinion. Does any one
here have n idea on how to solve it?

The hacking challenge is:
We are looking for a structure or variables that represent the size
of heap, stack, code and data in physical memory. We found some
structures on kernel source 2.6 like mm_struct and vm_area_struct,
but these structures give the size of process (stack,code, data, heap
separately) allocated in virtual memory. The only information we
found about physical memory is rss, but this variable does not provide
the size of stack, code, data, heap separately.

The pmap of Linux doesn't provide these data also since it is
actually inside /proc.

We think the only way to get this information is through the way
the page table sets the page resident flag and use some variables
to calculate the size of such elements (stack, code, data, heap)
allocated in physical memory. But the implementation of page
table is not trivial, the same for pgd, pmd and pte.

We'd like to know if it is possible to calculate the size of these
elements without losing the OS performance?

Is there any better solution to do that?

Edjard



                 reply	other threads:[~2003-11-15  1:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3093.200.208.225.32.1068857385.squirrel@webmail.ufam.edu.br \
    --to=edjard@ufam.edu.br \
    --cc=Allan.Bezerra@indt.org.br \
    --cc=Mauricio.Lin@indt.org.br \
    --cc=ajsb@dcc.fua.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mauriciolin@bol.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).