|
Boost Users : |
Subject: [Boost-users] [Interprocess] Using existing containers after grow()
From: Malko (malko.bravi_at_[hidden])
Date: 2015-03-04 08:36:45
Hi,
I am having some difficulties understanding the relationship between
allocators for containers and grow().
Let's say I create a vector (whatever type) in shmem, then I unmap
everything and proceed to grow the shmem from 1MB to 2MB and remap.
I can now access my old vector and start adding new entries.
What I am unsure about is: would this vector be able to create new entries
until the whole 2MB are allocated, or would it stop at 1?
I have not seen anywhere in the docs any warning about the need to
construct new containers after a grow, so I assume my vector can grow up
to to 2MB now. Then my question is: how does it know that now it can grow
up to 2MB if the allocator I passed on construction was instantiated from
a segment_manager that knew about a shmem of size 1MB? Is there somewhere
in shared memory a segment_manager-like object that stores info about the
shmem itself (and can I access it in my code)?
Any help would be greatly appreciated,
Malko
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