|
Boost Users : |
Subject: Re: [Boost-users] [interprocess] support for private mappings?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-01-03 04:54:54
Zeljko Vrba wrote:
> On Sat, Jan 03, 2009 at 12:52:49AM +0100, Ion Gaztañaga wrote:
>> You can also use lower level mapped_region for copy-on-write file
>> mappings using mode_t = copy_on_write.
>>
> Cool, thank you!
>
> So the following should work (I'm not using managed SHM)?
>
> file_mapping fm_("myfile", read_only);
> mapped_region mr_(fm_, copy_on_write);
It should, because that's the way open_copy_on_write
managed_shared_memory is implemented ;-)
> Some suggestions for documentation improvements (IMHO):
>
> This page in the reference documentation
>
> http://www.boost.org/doc/libs/1_37_0/doc/html/boost/interprocess/mapped_region.html
>
> does not mention the copy_on_write mode; it would be very helpful if that mode
> were mentioned there.
Yes, copy_on_write should also appear here, because it's an lower-level
but useful OS wrapper. Added to my to-do list.
> I also feel that it would be more natural if the section you quoted were moved
> to the "Sharing memory between processes" chapter because that mode is an
> inherent property of mapped files (generic OS mechanism), not of managed shared
> memory (particular framework implemented by your library).
Ok, I'll see if it fits better there.
Regards,
Ion
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net