Raj <rajagopalan.duraisamy@xxxxxxxxx> wrote: > 1. According to the vm_area_struct there is a reference to only 1 > mm_struct ? So is a VMA ever shared between processes or is restricted > only to that process which owns it ? vm_area_struct belongs to 1 mm_struct only. > 2. If VMAs are not shared then how are shared memory implemented ? There can be multiple VMA's belonging to an address_space. > 3. If VMAs are not shared then how do processes share shared object > text regions ? Through the address_space which corresponds to an inode. > There is a flag called VM_NONLINEAR . What is it used for ? What does > it mena when we say VMA is non-linear ? According to my understanding > a VMA is a linear adress region in the process's user address space. > Is this correct or wrong ? The VMA represents a virtually contiguous range of memory that can be mapped onto either a linear or non-linear address space. To create a non-linear mapping from user space you can user remap_file_pages() (in which the pages are mapped in a non-sequential order). That's the only case I am aware of that sets the VM_NONLINEAR flag. -- Catalin -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/