1 /* Copyright (C) 2011 Kwan Ting Chan 2 * Based from bug report submitted by Xiaohan Wang 3 * 4 * Use, modification and distribution is subject to the 5 * Boost Software License, Version 1.0. (See accompanying 6 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 7 */ 8 9 // Test of bug #3349 (https://svn.boost.org/trac/boost/ticket/3349) 10 11 #include <boost/pool/pool.hpp> 12 13 #include <boost/core/lightweight_test.hpp> 14 main()15int main() 16 { 17 boost::pool<> p(256, 4); 18 19 void* pBlock1 = p.ordered_malloc( 1 ); 20 void* pBlock2 = p.ordered_malloc( 4 ); 21 (void)pBlock2; // warning suppression 22 23 p.ordered_free( pBlock1 ); 24 25 BOOST_TEST(p.release_memory()); 26 return boost::report_errors(); 27 } 28