Hi shivaligupta > Suppose we have two processes A and B > Both uses a shared library C > Process A initial vmsize without loading C is x > and Process B initial vmsize without loading C is y > Now Process A loads shared library C, so its Vmsize becomes x+z, > where z is vmsize for C > > Now Process B tries toload shared library C, but as its mmap calls > see that this library is already loaded it wont load C again. > > Now my doubt is that whether Process B vmsize will now be y or y+z B size is y+z. Why? Yes, it is not loaded from the disk, but C is still mapped to B process address space. Once again, here we are dealing with the size of VMA, not how many distinct pages that is owned by the process. You meet more or less similar condition in multi threading program. Each child process is seen as it owns a separate address space, but the fact is, they shared some their VMAs with the parent. Feel free to CMIIW, folks regards Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/