Also, about threads. This is being malloced/free in two separate threads, however I sort of assumed that pool was thread safe because of discussion about using boost::thread instead of their current scheme for thread safety on another mailing list. Was my assumption wrong, i.e. pool is not thread safe?
The pool allocators are thread safe, pool as such is not.
(I am a little hesitant to blame this completely on threading without searching a bit elsewhere because of the way the three threads operate, there is very little chance they are stomping over the pool, and the other threads are also all in wait states when this occurs)
I have reviewed the pool code quite thoroughly after having some issues with it, and I think the code is OK in the Boost version that I'm using now (1.38). Cheers, Filip