]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/test_msvc_mem_leak_detect.cpp
1 /* Copyright (C) 2011 Kwan Ting Chan
3 * Use, modification and distribution is subject to the
4 * Boost Software License, Version 1.0. (See accompanying
5 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 // Test of bug #4346 (https://svn.boost.org/trac/boost/ticket/4346)
11 #define _CRTDBG_MAP_ALLOC
16 #include <boost/pool/poolfwd.hpp>
17 #include <boost/pool/simple_segregated_storage.hpp>
18 #include <boost/pool/pool.hpp>
19 #include <boost/pool/pool_alloc.hpp>
20 #include <boost/pool/singleton_pool.hpp>
21 #include <boost/pool/object_pool.hpp>
30 boost::pool
<> p(sizeof(int));
35 boost::object_pool
<Foo
> p
;
40 (boost::singleton_pool
<Foo
, sizeof(int)>::malloc
)();
42 boost::singleton_pool
<Foo
, sizeof(int)>::purge_memory();
45 std::vector
<int, boost::pool_allocator
<int> > v
;
48 boost::singleton_pool
<boost::pool_allocator_tag
,
49 sizeof(int)>::release_memory();