$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] pool allocator based on element type instead of size?
From: Kenny Riddile (kfriddile_at_[hidden])
Date: 2009-06-16 23:32:05
I've found myself wanting something similar to
boost::fast_pool_allocator, but with the following syntax for releasing
memory:
using namespace boost;
std::list< T, fast_pool_allocator<T> > myList;
// Note that second template parameter is T, not sizeof(T).
// Basically I guess I just want a pool per type, even if
// two types have the same size.
singleton_pool< fast_pool_allocator_tag, T >::release_memory();
Is there a reason why this isn't doable that I should know about before
I try to implement it? Has something similar already been done (even if
it's from outside the Boost community) so I don't reinvent the wheel?
Thanks,
Kenny Riddile