After reading more thoroughly into the boost.pool
documentation, I think I understand my confusion. I'm used to thinking of an object pool implemented as a class which allocates and manages a set of direct objects. Consider,
template<class T>
class object_pool {
private:
std::list<T*> m_reserved; // holds onto any objects that have been allocated
public
T *acquire() { /* grabs from reserved list */ }
};
However, it seems boost.pool
implements a different concept of object pooling, one used for a completely different purpose than the one as suggested above. boost.pool
allocates and manages the underlying memory of the desired object(s), presumably so that it can increase heap performance by means of what it describes as Simple Segregated Storage. It in fact does not follow this concept of the object pool pattern. An explanation on the distinction between the two patterns can be found in the answer to my subsequent question.