Quote:
Originally Posted by kefeng.chen
I want to exactly copy the data segment of a process to the memory space of another process running on another computer, so that the target process can use the same pointer to access the same data.
|
If you want to do
that, you can't expect to do that with the process's
data segment. Instead, all of the processes must request and attach-to a
shared memory segment .. making sure that the mapping is at the same address in everyone's virtual-memory space.
When you do this (successfully), Linux will set up your page-tables so that every one of you has access to the same virtual-memory pages, at exactly the same virtual addresses. Changes made by any process will be simultaneously and instantly reflected in every other one, because each and every one of you has access to exactly the same set of physical page-frames.