I have serious doubts about the shared library. I learned that the virtual address of the library that will be shared by different processes will be the same for all these processes. But I tried to learn the same thing with the proc file system with the following set of commands:
$ cat /proc/*/maps | grep /lib/libc-2.12.1.so
The output was:
0025a000-003b1000 r-xp 00000000 08:07 1046574 /lib/libc-2.12.1.so 003b1000-003b2000
Virtual addresses are different for the same shared library for different processes.
Can someone explain to me why this is so?
linux virtual-memory shared-libraries procfs
pradeepchhetri
source share