|
Boost Users : |
From: Williams, Alan B (william_at_[hidden])
Date: 2007-06-12 17:30:53
I have a question about using the standard allocator interface in the
boost.pool library. (I'm using boost 1.34.0 with g++ 3.4.3 on redhat
linux, in case it matters.)
I've successfully used boost::pool_allocator with individual std::vector
objects, but I'm having trouble using it with a vector-of-vectors
object, like this:
std::vector<std::vector<int, boost::pool_allocator<int> > > myvec(1);
myvec[0].push_back(99);
The "push_back" line causes a seg-fault, which purify says is an
array-bounds-write occurring in
boost::simple_segregated_storage<unsigned long>::segregate.
Am I misusing the pool_allocator?
Thanks,
Alan
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