Does mmap share memory with all processes?
问题 When I do this : myProgram.h myProgram.c struct PipeShm { // all my fields // more // ... }; struct PipeShm myPipe = { /* initialization for all fields */ }; struct PipeShm * sharedPipe = &myPipe; void func() { sharedPipe = mmap (NULL, sizeof * sharedPipe, PROT_READ | PROT_WRITE,MAP_SHARED | MAP_ANONYMOUS, -1, 0); } When I mmap the pointer sharedPipe , if I invoke from main() any methods from myProgram code, would all processes share the exact shared memory that I shared with myPipe struct?