Shared Memory

Two processes, threads, or objects can communicate via Shared Memory. Using shared memory requires all participants to be located on the same Physical Machine or Virtual Machine. Shared memory is one of the fastest communication mechanisms compared, say, to Sockets, HTTP, IIOP, or DCOM. However, Shared Memory is a brittle Low Level Solution that requires Careful Coding with Synchronization Objects.


In particular, use of shared memory can lead to problems when passing around class objects as in C++: your object data goes into the shared memory while the class's virtual function tables stay in process memory, and aren't accessible from the process you're sharing with. See Virtual Functions And Shared Memory.

See original on c2.com