> It is unspecified whether data in MAP_PRIVATE mappings has any permanent storage locations.
So what are these "permanent storage locations". A tmp file in the
file system name space, that would be deleted upon system restart
seems the most likely candidate. (In fact, as I type this, I seem to
remember that this occurs in some os's.) Could it be other than a tmp
file?
An implementation could define a standard way to find the persistant
storage of MAP_PRIVATE mappings. This could be useful to allow them to
be persisted over reboots.
The wording is left open to allow this sort of extension. Likely most
implementations would simply ignore an msync() call on a private mapping.
Chris
It can't have a permanent storage location: the data is anonymous
because it private.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
It is not true that it "can't" have such a location. The spec doesn't
mandate a storage location, but it doesn't say that they are forbidden
either. A conforming implementation could specify a storage location
for private mappings should it wish to do so.
Chris
Ah, but it is *private* so it is clearly it cannot be in the filesystem
space.
>> It is not true that it "can't" have such a location. The spec doesn't
>> mandate a storage location, but it doesn't say that they are forbidden
>> either. A conforming implementation could specify a storage location
>> for private mappings should it wish to do so.
>
> Ah, but it is *private* so it is clearly it cannot be in the filesystem
> space.
Sure it can. Nothing says that the filesystem space has to be global.
It would be relatively straightforward to implement this using
per-process filesystem namespaces. Linux could do this now if anyone
wanted to do it.
Chris