]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/test_bug_3349.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / 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
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/detail/lightweight_test.hpp>
14
15 int 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 }