Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:30

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
0004 // Software License, Version 1.0. (See accompanying file
0005 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // See http://www.boost.org/libs/interprocess for documentation.
0008 //
0009 //////////////////////////////////////////////////////////////////////////////
0010 
0011 #ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
0012 #define BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
0013 
0014 #ifndef BOOST_CONFIG_HPP
0015 #  include <boost/config.hpp>
0016 #endif
0017 #
0018 #if defined(BOOST_HAS_PRAGMA_ONCE)
0019 #  pragma once
0020 #endif
0021 
0022 #include <boost/interprocess/detail/config_begin.hpp>
0023 #include <boost/interprocess/detail/workaround.hpp>
0024 
0025 #include <boost/interprocess/interprocess_fwd.hpp>
0026 #include <boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp>
0027 #include <boost/interprocess/offset_ptr.hpp>
0028 
0029 //!\file
0030 //!Describes sequential fit algorithm used to allocate objects in shared memory.
0031 
0032 namespace boost {
0033 namespace interprocess {
0034 
0035 //!This class implements the simple sequential fit algorithm with a simply
0036 //!linked list of free buffers.
0037 template<class MutexFamily, class VoidPointer>
0038 class simple_seq_fit
0039    : public ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer>
0040 {
0041    #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
0042    typedef ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer> base_t;
0043    #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
0044 
0045    public:
0046    typedef typename base_t::size_type                            size_type;
0047 
0048    //!Constructor. "size" is the total size of the managed memory segment,
0049    //!"extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(simple_seq_fit)
0050    //!offset that the allocator should not use at all.*/
0051    simple_seq_fit(size_type segment_size, size_type extra_hdr_bytes)
0052       : base_t(segment_size, extra_hdr_bytes){}
0053 };
0054 
0055 }  //namespace interprocess {
0056 
0057 }  //namespace boost {
0058 
0059 #include <boost/interprocess/detail/config_end.hpp>
0060 
0061 #endif   //#ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
0062