Subject: Re: [boost] [interprocess] [container] Can iterator hold raw-pointer instead of offset_ptr?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-04-29 03:54:35
On 28/04/13 09:06, TONGARI wrote:
> Hi there,
> When putting containers in shared memory, offset_ptr is used internally,
> and IIUC, the iterator of the container will also use offset_ptr. But it
> seems to me that in most cases we only use iterator locally rather than
> putting those iterators in shared memory as well, so the
> plain-old-raw-pointer is sufficient and hopefully more efficient for
> iterator's usage.
> What do you think?
I have seen some people force a shared memory segment to be mapped at
the same address in all processes so that they could avoid using
offset_ptr and get better performance.
If you're looking for performance, that might be an option as well. I
don't know how much boost.interprocess makes it easy to do this.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk