linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2003-11-15  0:49 edjard
  0 siblings, 0 replies; only message in thread
From: edjard @ 2003-11-15  0:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mauricio.Lin, Allan.Bezerra, mauriciolin, ajsb

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-11-15  1:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-15  0:49 edjard

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