Re: doubt regarding VMA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Ketan...


> do with page tables. So VMA can not be shared even in clone(), rather
> it is copied into other process's task_struct. So with clone() you
> will have two copies of same VMA values inside both the processes. I
> think VMA can never be shared (single instance shared by both
> processes).

in the case you are calling clone() with non CLONE_VM, the above 
statement is correct. However, if you use CLONE_VM, the mm_struct 
between the parent and the child is shared, thus the VMA is also 
shared. Try to read about it on Linux kernel development and/or 
directly inside the source code (kernel/fork.c on copy_mm() ). Hope it 
helps

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux