On 12:37 Sat 29 Mar , cadetg marco wrote: > Hi KernelNewbies! > > Why are shared libraries hold multiple times in memory even if two > processes uses the same libraries? Are they? > I've made a little test with > firefox and epiphany both are using the same SO --> > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so. > > Anyway if I look into /proc/$PID/maps of both processes I can clearly > see that the library is hold multiple times in ram: > > firefox libs --> pango > 2aaab9e49000-2aaab9e4b000 r-xp 00000000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaab9e4b000-2aaaba04a000 ---p 00002000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaaba04a000-2aaaba04b000 r--p 00001000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaaba04b000-2aaaba04c000 rw-p 00002000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > > Epiphany libs --> pango > 2aaab6287000-2aaab6289000 r-xp 00000000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaab6289000-2aaab6488000 ---p 00002000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaab6488000-2aaab6489000 r--p 00001000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > 2aaab6489000-2aaab648a000 rw-p 00002000 08:02 7604731 > /usr/lib64/pango/1.6.0/modules/pango-basic-fc.so > > Please see the address differs which results that the library is hold > multiple times in ram. These are *virtual* addresses not *physical* addresses. The same virtual address points to completly different physical memory regions for different processes. And the same physical address might be accessed with multiple virtual addresses. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.homelinux.net -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ