pmap
Given the following output, can someone tell me:
1) Hex Decimal 080b0fff = 134942719 08048000 = 134512640 Diff = 430079 Why does pmap indicate the size as 420k? 2) What's the purpose of the Offset column when the whole address range is shown? 3) The "rwxpc" column indicates that this segment is readable, executable, private, and the + sign indicates that COW is required. If there has been 3 forks (ie 1 parent and 3 child processes), and only of these three child processes has attempted to write to the segment, is this enough to cause this + sign to change to a - sign? Or all 3 child processes needs to have attempted to write to the segment, and all 3 has a COW, before the - sign will appear? 4) What does the I/W/A column indicate? Code:
$ pmap -a |
Quote:
Quote:
Quote:
Quote:
|
neonsignal, thanks for the explanations. Regarding the following, can you give me some examples of what is a "wired count"? I'm not following what you meant by "whether the region is wired in". As for the number "1" under the "I" column, I guess this is because the memory is shown as a COW type with the "+" sign under the "rwxpc" column?
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
|
For the jmap vs pmap output example, here's what I see (truncated a lot of other stuff).
Essentially the key points I notice are: 1) jmap lists the code section and pmap lists both code and data sections. 2) Size in jmap is different than size in pmap. For example: 46k vs 40k for java 1225k vs 104k for ld-2.4.so 1261k vs 104k for liba.so 47343k vs 31652k for liba.so 3) pmap lists things like [heap], [anon]. What are these? Can I ask, based on looking at pmap, how can I tell what is the stack and heap boundary addresses? jmap Code:
0x0000000008048000 46K /usr/test/jdk1.6.0_16/bin/java Quote:
|
Quote:
For example, Code:
for java -> 46k vs 40k+4k Quote:
Quote:
|
Thanks. Didn't realize that jmap is adding the code and data segment. As for
Quote:
|
Quote:
The pmap can't be relied upon to identify segment types (the contents will vary depending on how the language/code works). Often the heap will be the largest writable segment at the end of the low address segments, and the stack will be the last of the high address segments. Quote:
Quote:
Quote:
To view the contents of these address spaces, it would be usual to employ a debugger (eg use gdb to dump memory contents). In a Java context, it might be more useful to run a Java debugger, though that might not have quite the same low level functionality? |
All times are GMT -5. The time now is 11:09 PM. |