I am trying to create a parent and child process that have access to the same memory or same variables. Is there an easier better way than shared memory.
It's difficult to say without knowing more about your application.
Shared memory is generally the *fastest* means of sharing data between processes because once each process has attached the segment there is no further kernel involvement. Of course, an access control mechanism like semaphores is needed, which complicates things a bit.
Message queues are slower but easier to use as the kernel handles access control.
Russ
bobbitts@hotmail.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.