Re: [test patch] dirty shared mappings

Michael Marxmeier (mike@msede.com)
Sat, 10 Jan 1998 01:28:09 +0100


> I think only children can get it. To test this I wrote the test program
> which is appended to the end of this email.
>
> When I run it under Digital Unix I get:
> ptr contains the string ""
>
> Which indicates that other processes can not get to your anonymous
> shared memory.

Same on HP-UX 10. If the mmap() is done before the fork, the region
is shared among processes. So it's close to shm.

The man page specifies:
If MAP_ANONYMOUS is set in flags:
+ A new memory region is created and initialized to all
zeros.
This memory region can be shared only with descendants
of the current process.
...

Michael

-- 
Michael Marxmeier           Marxmeier Software GmbH
E-Mail: mike@msede.com      Suedstrasse 58
Voice : +49 202 2431440     42119 Wuppertal, Germany
Fax   : +49 202 2431420     http://www.msede.com/