]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/interprocess/mem_algo/simple_seq_fit.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / interprocess / mem_algo / simple_seq_fit.hpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/interprocess for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10
11 #ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
12 #define BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
13
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
16 #endif
17 #
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
19 # pragma once
20 #endif
21
22 #include <boost/interprocess/detail/config_begin.hpp>
23 #include <boost/interprocess/detail/workaround.hpp>
24
25 #include <boost/interprocess/interprocess_fwd.hpp>
26 #include <boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp>
27 #include <boost/interprocess/offset_ptr.hpp>
28
29 //!\file
30 //!Describes sequential fit algorithm used to allocate objects in shared memory.
31
32 namespace boost {
33 namespace interprocess {
34
35 //!This class implements the simple sequential fit algorithm with a simply
36 //!linked list of free buffers.
37 template<class MutexFamily, class VoidPointer>
38 class simple_seq_fit
39 : public ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer>
40 {
41 #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
42 typedef ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer> base_t;
43 #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
44
45 public:
46 typedef typename base_t::size_type size_type;
47
48 //!Constructor. "size" is the total size of the managed memory segment,
49 //!"extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(simple_seq_fit)
50 //!offset that the allocator should not use at all.*/
51 simple_seq_fit(size_type segment_size, size_type extra_hdr_bytes)
52 : base_t(segment_size, extra_hdr_bytes){}
53 };
54
55 } //namespace interprocess {
56
57 } //namespace boost {
58
59 #include <boost/interprocess/detail/config_end.hpp>
60
61 #endif //#ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
62