AMDG
It's called with 5 different data structures (all with a different size). I'm not exactly sure the distribution of these but can measure it if that would be of use. Here are the [obfuscated but structurally-equivalent] types:
struct T1
{
C* _p;
boost::function
I'm just using the default specialization like such:
struct scalable_alloc_tag {}; T* ret = (T*)boost::singleton_pool
::malloc(); if (!ret) throw std::bad_alloc(); new (ret) T();
What is sizeof(T)?
Yep, malloc and free are being called simultaneously from the main thread and worker threads. The docs say that it is thread-safe "if there is only one thread running before main() begins and after main() ends" [which is our case].
Okay. Yes. The default specialization should be thread-safe. It doesn't look like there is any way for the implementation to be bad in that respect since it simply locks around every operation. Just to be pedantic, you might check to make sure that BOOST_NO_MT is not defined after including any pool headers.
A rough calculation shows that approx 8.64 billion alloc/free pairs occurred before the crash.
Okay, that's way more than my brief test got to. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users