
Only one of them did get corrupted (but the program halted at that point so I can't say for sure that they others wouldn't have). I believe it was T5. I'll construct a stress test tomorrow which tests all 5 pools with their actual frequencies of allocation and post the results back here. If that test passes, then I suppose it must be heap or stack corruption in my program (which just so happened to negatively affect singleton_pool but not tbb:scalable_alloc). --Jonathan ________________________________________ From: boost-users-bounces@lists.boost.org [boost-users-bounces@lists.boost.org] On Behalf Of Steven Watanabe [watanabesj@gmail.com] Sent: Thursday, July 02, 2009 9:27 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [pool] singlton_pool::malloc returning bad address AMDG Jonathan Leonard wrote:
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<void (int, bool)> _f; unsigned __int64 _offset1; unsigned __int64 _offset2; boost::shared_ptr<std::vector<BYTE, VirtualAllocator<BYTE>>> _vec; };
struct T2 { boost::function<void (bool)> _f; };
struct T3 { C* _p; C* _p2; };
struct T4 { C* _p; C* _p2; unsigned int _i; unsigned int _i2; C* _p3; unsigned int _i3; C* _p4; int _i4; };
struct T5 { C* _p; int _i; int _i2; unsigned int _i3; unsigned int _i4; };
Which of these causes problems? Or do the pools all get corrupted? I've just tried running about 35 billion 8-byte allocations without any problems. In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users