[pool] Does Simple Segregated Storage support arrays?

The documentation at file://localhost/C:/Boost/libs/pool/doc/concepts.html says: "Each of the chunks in any given block are always the same size. This is the fundamental restriction of Simple Segregated Storage: you cannot ask for chunks of different sizes." Okay, but can I ask for more than one chunk of the same size - for an array? Boris

Boris wrote:
The documentation at file://localhost/C:/Boost/libs/pool/doc/concepts.html says: "Each of
Sorry, the link should have been http://www.boost.org/libs/pool/doc/concepts.html. Boris

On 6/23/06, Boris <boriss@web.de> wrote:
The documentation at file://localhost/C:/Boost/libs/pool/doc/concepts.html says: "Each of the chunks in any given block are always the same size. This is the fundamental restriction of Simple Segregated Storage: you cannot ask for chunks of different sizes."
Okay, but can I ask for more than one chunk of the same size - for an array?
With the boost interface you can use malloc_n(), though freelists aren't meant for arrays. In fact, malloc_n() will fail if it doesn't find an obviously contiguous chunk. Common usage of a freelist will make the freelist non-contiguous so you probably want to look elsewhere.
Boris
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Cory Nelson http://www.int64.org

Cory Nelson wrote:
On 6/23/06, Boris <boriss@web.de> wrote:
The documentation at file://localhost/C:/Boost/libs/pool/doc/concepts.html says: "Each of the chunks in any given block are always the same size. This is the fundamental restriction of Simple Segregated Storage: you cannot ask for chunks of different sizes."
Okay, but can I ask for more than one chunk of the same size - for an array?
With the boost interface you can use malloc_n(), though freelists aren't meant for arrays. In fact, malloc_n() will fail if it doesn't find an obviously contiguous chunk. Common usage of a freelist will make the freelist non-contiguous so you probably want to look elsewhere.
Thanks for your answer! I'm using boost::pool currently which doesn't provide malloc_n(). There is only ordered_malloc(n). But as I understand now from your answer it won't help much either as there is no support for arrays in Boost Pool. Is this correct? Boris
participants (2)
-
Boris
-
Cory Nelson