|
Boost Users : |
Subject: Re: [Boost-users] [Container] [Intrusive] [Interprocess] Flat Intrusive Containers?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2012-06-14 12:57:15
El 14/06/2012 0:17, Hering Cheng escribió:
> Hi,
>
> While Boost.Intrusive provides more varieties of containers than
> Boost.Container, I wonder if it would make sense to provide flat maps or
> sets. The application I have in mind is to use these flat containers in
> shared memory in such a way that application programs preallocate all
> memory, just like it is possible with Instrusive containers. Would this
> be feasible? If this makes sense, is there any plan to make this available?
I have doubts with non-node based containers. Making vectors and
flat_xxx intrusive is not very "intrusive" (you don't need to modify
your values) but the hard part is in the memory reallocation / copying
code. I can't think of a good intrusive interface for such containers,
as the differ a lot from node based containers in the error handling. In
Boost.Intrusive node-based containers you can always insert a new value
because the value is all the memory you need (even in unordered
containers container gracefully degrades to higher load factor).
Maybe a Boost.Container with a custom allocator could do the job
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