Let's say I have a process in Linux from which I am fork()another identical process. After forking, when the source process starts writing to memory, the Linux write-write mechanism will provide the process with unique pages of physical memory that are different from those used by the forked process.
How can I at some point in the execution find out which pages of the original process were copied to the record?
I do not want to use the SIGSEGV signal handler and provide read-only access to all pages at the beginning, as this causes overhead that I do not want.
source
share