Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] error_code_t = 9 (already_exists_error) while opening a fixed_managed_shared_memory
From: Marsh Ray (marsh_at_[hidden])
Date: 2011-05-20 11:26:25


On 05/20/2011 03:15 AM, Gaetan Gaumer wrote:
>
> If two processes can't be sure to be able to map the segment at the same address
> then fixed_managed_shared_memory seems to be useless.

Yes, in general I would not use fixed address shared memory.

There are special circumstances where one might need it:

* You might reserve the memory in one process and then fork(), ensuring
that the child process has the same memory layout.
* You may be able to pre-reserve address regions before anything else
gets mapped in your process.
* You may be using special kernel facilities or hardware devices that
guarantee the memory range will be accepted.

Maybe the docs could help new users by discussing these drawbacks a
little more prominently?

- Marsh


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