[Container] [Intrusive] [Interprocess] Flat Intrusive Containers?
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? Thanks. Hering
Hering Cheng
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?
Boost.Container already has a flat_map/flat_set [1]. Have your tried using them with an allocator from interprocess? HTH, Philipp Footnotes: [1] http://www.boost.org/doc/libs/1_49_0/doc/html/container/non_standard_contain...
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
participants (3)
-
Hering Cheng
-
Ion Gaztañaga
-
Philipp Moeller