diff options
Diffstat (limited to '3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp b/3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp index 6d136f8..159bd5e 100644 --- a/3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp +++ b/3rdParty/Boost/src/boost/smart_ptr/detail/quick_allocator.hpp @@ -74,8 +74,9 @@ template<unsigned size, unsigned align_> struct allocator_impl static lightweight_mutex & mutex() { - static lightweight_mutex m; - return m; + static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm; + static lightweight_mutex * pm = new( &fbm ) lightweight_mutex; + return *pm; } static lightweight_mutex * mutex_init; |