|
Boost Users : |
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-04-11 16:10:28
hgdhfdghsa_at_[hidden] wrote:
> Hello,
>
> in my application I am forced to create a shared memory segment whose size can change at runtime. Is it possible to implement such a shared memory segment using the boost.interprocess library?
> I do not want to pre-allocate a big shared memory segment, as in most cases the segment is small (about 100bytes). Just in some very rare cases it gets very big (5MB or even more).
>
> Thank you
Sorry, but this is an issue that no one has solved yet ;-) The only
thing you can do is to grow it offline (that is, without processes
connected to it). See "Growing managed segments" in the documentation.
Growing shared memory dynamically is well beyond the scope of a library.
I would need the help of the OS to automatically increase the memory
mappings of all processes atomically. Even with the OS, I don't think
it's possible without the collaboration and processes. It's in the to-do
list, but I don't see how could I implement it.
Regards,
Ion
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