9 Apr
2009
9 Apr
'09
8:38 a.m.
Brent Arias wrote:
I'd like to know if interprocess allocators can already do this for me (via template params, etc) or if I need to write my own allocator. If this is done correctly, I think it means I can "new" MyBinarySerialType from the regular heap and it will work entirely outside of shared memory. Likewise if I use segment.construct<MyBinarySerialType>()(...), then the whole thing should be created inside of shared memory. Either way, the vector will allocate strictly to a piece of memory inside the size of the class.
No, you need to write your own allocator. Interprocess vector is a standard conforming vector that supports non-raw pointers, nothing else.
Brent Arias
Best, Ion