
I forgot to mention one other (important) thing: I'm using libgmalloc (http://developer.apple.com/documentation/Darwin/Reference/ManPages/ man3/libgmalloc.3.html). When I don't use this guard-malloc approach, all is well. :-P -C On 02/08/2005, at 10:52 AM, Christopher Hunt wrote:
I have some more information and a work-around. I can now reproduce this problem in my Obj-C program with the following code:
typedef checked_array_deleter<unsigned short> deleter; detail::sp_counted_base_impl
* theP = new detail::sp_counted_base_impl (0, deleter()); However if I define either BOOST_SP_USE_QUICK_ALLOCATOR or BOOST_SP_USE_STD_ALLOCATOR then all is well. :-)
Here's my new stack trace for when things don't go well:
#0 0x90012d68 in pthread_mutex_init #1 0x00088484 in boost::detail::lightweight_mutex::lightweight_mutex() at lwm_pthreads.hpp:47 #2 0x00088084 in boost::detail::lightweight_mutex::lightweight_mutex() at lwm_pthreads.hpp:49 #3 0x00087c24 in boost::detail::sp_counted_base::sp_counted_base() at shared_count.hpp:98 #4 0x00086674 in boost::detail::sp_counted_base::sp_counted_base() at shared_count.hpp:99 #5 0x00097f64 in boost::detail::sp_counted_base_impl
::sp_counted_base_impl(unsigned short, boost::checked_array_deleter<unsigned short>) at shared_count.hpp:253 #6 0x00097f0c in boost::detail::sp_counted_base_impl
This thus looks like something to do with allocators and sp_counted_based_impl...
I don't see that my Obj-C environment has set up anything interesting by the way of allocators, and I did create a brand-new Obj-C project to see if I could reproduce the problem - I couldn't... however I'm thinking that this might well have something to do with Obj-C...
Any ideas?
Also, if I'm to define BOOST_SP_USE_QUICK_ALLOCATOR or BOOST_SP_USE_STD_ALLOCATOR then which is best? I've been unable to find documentation on the use of these defines.
Thanks for your help.