* Help understanding memory layout
@ 2004-10-28 17:21 Phy Prabab
2004-10-28 17:46 ` linux-os
2004-10-28 19:46 ` Jesper Juhl
0 siblings, 2 replies; 3+ messages in thread
From: Phy Prabab @ 2004-10-28 17:21 UTC (permalink / raw)
To: linux-kernel
Hello,
I need some help understanding memory layout of
applications within memory under linux. I am using
the command "pmap" to understand where all the
elements of my application are laying and found that I
just do not understand how and why it is layed out in
a particular fashion. Is there documentation that
could help me understand memory management under
Linux?
Thank you for your time.
Phy
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help understanding memory layout
2004-10-28 17:21 Help understanding memory layout Phy Prabab
@ 2004-10-28 17:46 ` linux-os
2004-10-28 19:46 ` Jesper Juhl
1 sibling, 0 replies; 3+ messages in thread
From: linux-os @ 2004-10-28 17:46 UTC (permalink / raw)
To: Phy Prabab; +Cc: linux-kernel
On Thu, 28 Oct 2004, Phy Prabab wrote:
> Hello,
>
> I need some help understanding memory layout of
> applications within memory under linux. I am using
> the command "pmap" to understand where all the
> elements of my application are laying and found that I
> just do not understand how and why it is layed out in
> a particular fashion. Is there documentation that
> could help me understand memory management under
> Linux?
>
> Thank you for your time.
> Phy
You can look in /proc/PID/maps to see where memory-mapped
stuff exists. PID is the process-ID number.
You can also use printf("%p\n", function); to get the
offset of any function in your code. Using this same
method, you can also print the offset of anything that
can be labeled in your code.
These offsets are only useful for mental
masturbation. If your application needs to know
the layout of its code and data it is severely
broken and needs to be fixed. All data elements
are accessible using conventional language methods
such as pointers, array elements, and structure
members.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by John Ashcroft.
98.36% of all statistics are fiction.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help understanding memory layout
2004-10-28 17:21 Help understanding memory layout Phy Prabab
2004-10-28 17:46 ` linux-os
@ 2004-10-28 19:46 ` Jesper Juhl
1 sibling, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2004-10-28 19:46 UTC (permalink / raw)
To: Phy Prabab; +Cc: linux-kernel
On Thu, 28 Oct 2004, Phy Prabab wrote:
> Is there documentation that
> could help me understand memory management under
> Linux?
>
A few bits and pieces of varying age and level of detail that may be of
interrest :
http://www.skynet.ie/~mel/projects/vm/
http://www.csn.ul.ie/~mel/projects/vm/guide/html/understand/
http://www.phptr.com/title/0131453483
http://linux-mm.org/
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
--
Jesper Juhl
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-28 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28 17:21 Help understanding memory layout Phy Prabab
2004-10-28 17:46 ` linux-os
2004-10-28 19:46 ` Jesper Juhl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®