
Am Mittwoch, 1. April 2009 18:58:39 schrieb Ion Gaztañaga:
Thanks for the quick reply, Dan. Yes, all pointers placed in shared memory should be offset_ptr as explained here:
http://www.boost.org/doc/libs/1_38_0/doc/html/interprocess/sharedmemorybetw eenprocesses.html#interprocess.sharedmemorybetweenprocesses.mapped_region_ob ject_limitations
Thanks for the quick reply!
Meanwhile I suspected as much, but didn't know for sure how to interpret the
docs.
Also, this alignment check taken from the docs doesn't compile anymore with a
pointer type as such:
struct transfer_buffer {
boost::interprocess::offset_ptr<void> buf;
size_t bufsize;
};
...
ret->bufsize = SIZE;
ret->buf = seg->allocate_aligned(ret->bufsize, Alignment);
// Check alignment
assert((static_cast