lkml.org 
[lkml]   [2001]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Memory maps
From
Date
Fu-hau Hsu <fhsu@ic.sunysb.edu> writes:

> Dear freinds:
>
> I have following questions about memory maps. I appreciate any
> suggestion.
>
> Q. (1)When a process is running, how can I get the range of data, stack,
> and code segments, say the stack segment is from address 0x..... to
> 0x..... so do data segments and code segments?
> PS: Under ELF format, there are several seperaed code and data
> segments, but the process control table has only one pair of
> pointers for each, Are the pointers still useful?


Sort of, you can currently confuse the elf loader with multiple bss segments.
The stack, and the brk pointer are still used.

> (2) /proc/*/maps will show us those info, but how does it get these
> info?

This is a reflection of what areas of memory the kernel sees. In principle
every thing is now handled by mmap, and this /proc/maps is a reflection
of that. See under the files in mm/*.c

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.088 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site