The question has nothing to do with variable scope. Shared memory is one form of interprocess communication, and is not a language feature. IPC is entirely implementation dependent. You'll need to Google for your particular platform and OS.