Well, I waited to see if anyone else more knowledgeable would reply as I am certainly no expert, but here goes...
Quote:
1) In this we can find , every library + object file is present three times. Why it is present 3 times?
|
I don't know why three entries for a loaded program or shared object. It used to be just two entries, and I can tell you why there were two.
The entry that is marked 'r-xp' is a code segment (sometimes called a text segment). It's the actual executable code in a program or .so (shared object).
The entry that is marked 'rw-p is the data segment (sometimes called .bss segment). I contains the program's variables and constants. Or at least it used to.
That leaves the 'r--p' areas. ?. Maybe program constants now?
You can use 'objdump' or 'readelf' to examine a program or .so, but it's somewhat complicated.
Quote:
2) There is no heap region associated with this process. Why?
|
I think heap is malloc'd virtual memory and is represented by these entries:
Code:
00a58000-00a5b000 rw-p 00000000 00:00 0
b782a000-b782b000 rw-p 00000000 00:00 0
b783a000-b783d000 rw-p 00000000 00:00 0
bfed5000-bfef6000 rw-p 00000000 00:00 0 [stack]
I believe the '00:00' (major:minor number) and '0' (inode) signify that the memory area is malloc'd.
Quote:
3). Stack region is present 3 times and the size is 0.
|
I think only the one that is marked [stack] is stack, and it's 4k in size (ending address bfef6000 minus starting address bfed5000 = 0x1000, or 4096 bytes). The reason I don't think the other two areas are stack is that they are not adjacent to the one marked stack.
Hope that helps.