Re: mmap(), MAP_SHARED, MAP_ANONYMOUS and sharing memory



On Dec 24, 9:44 am, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:

Create a memory region shared among all processes created by the
process who mmap'ed it and all processes created by these processes
and ...


So in summary you mean an area mapped with MAP_ANON + MAP_SHARED would
be shared among the descendants of the process. That makes sense since
only the descendants would know how to access the area.

Not at all. To share memory among unrelated processing using mmap, one
would either use shm_open or mmap real files.

I see that now.

Thanks,
Bahadir
.