]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/test_bug_3349.cpp
1 /* Copyright (C) 2011 Kwan Ting Chan
2 * Based from bug report submitted by Xiaohan Wang
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)
9 // Test of bug #3349 (https://svn.boost.org/trac/boost/ticket/3349)
11 #include <boost/pool/pool.hpp>
13 #include <boost/detail/lightweight_test.hpp>
17 boost::pool
<> p(256, 4);
19 void* pBlock1
= p
.ordered_malloc( 1 );
20 void* pBlock2
= p
.ordered_malloc( 4 );
21 (void)pBlock2
; // warning suppression
23 p
.ordered_free( pBlock1
);
25 BOOST_TEST(p
.release_memory());