1 //////////////////////////////////////////////////////////////////////////////
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)
7 // See http://www.boost.org/libs/interprocess for documentation.
9 //////////////////////////////////////////////////////////////////////////////
11 #ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
12 #define BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
14 #ifndef BOOST_CONFIG_HPP
15 # include <boost/config.hpp>
18 #if defined(BOOST_HAS_PRAGMA_ONCE)
22 #include <boost/interprocess/detail/config_begin.hpp>
23 #include <boost/interprocess/detail/workaround.hpp>
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>
30 //!Describes sequential fit algorithm used to allocate objects in shared memory.
33 namespace interprocess {
35 //!This class implements the simple sequential fit algorithm with a simply
36 //!linked list of free buffers.
37 template<class MutexFamily, class VoidPointer>
39 : public ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer>
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
46 typedef typename base_t::size_type size_type;
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){}
55 } //namespace interprocess {
59 #include <boost/interprocess/detail/config_end.hpp>
61 #endif //#ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP