AMDG Jonathan Leonard wrote:
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