Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/interprocess/mem_algo/simple_seq_fit.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 ">#
0019 #if defined(BOOST_HAS_PRAGMA_ONCE)
0020 #  pragma once
0021 #endif
0022 
0023 #include <boost/interprocess/detail/config_begin.hpp>
0024 #include <boost/interprocess/detail/workaround.hpp>
0025 
0026 #include <boost/interprocess/interprocess_fwd.hpp>
0027 #include <boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp>
0028 #include <boost/interprocess/offset_ptr.hpp>
0029 
0030 //!\file
0031 //!Describes sequential fit algorithm used to allocate objects in shared memory.
0032 
0033 namespace boost {
0034 namespace interprocess {
0035 
0036 //!This class implements the simple sequential fit algorithm with a simply
0037 //!linked list of free buffers.
0038 template<class MutexFamily, class VoidPointer>
0039 class simple_seq_fit
0040    : public ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer>
0041 {
0042    #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
0043    typedef ipcdetail::simple_seq_fit_impl<MutexFamily, VoidPointer> base_t;
0044    #endif   //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
0045 
0046    public:
0047    typedef typename base_t::size_type                            size_type;
0048 
0049    //!Constructor. "size" is the total size of the managed memory segment,
0050    //!"extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(simple_seq_fit)
0051    //!offset that the allocator should not use at all.*/
0052    simple_seq_fit(size_type segment_size, size_type extra_hdr_bytes)
0053       : base_t(segment_size, extra_hdr_bytes){}
0054 };
0055 
0056 }  //namespace interprocess {
0057 
0058 }  //namespace boost {
0059 
0060 #include <boost/interprocess/detail/config_end.hpp>
0061 
0062 #endif   //#ifndef BOOST_INTERPROCESS_SIMPLE_SEQ_FIT_HPP
0063