X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Fhtml%2Fboost%2Finterprocess%2Fsegment_manager.html;h=b41bd9c3d1e77b030dbd7f173aa3b47703e2414e;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=5cc26fbe1dfdd657ea8034001462515e95f323c7;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/doc/html/boost/interprocess/segment_manager.html b/doc/html/boost/interprocess/segment_manager.html index 5cc26fb..b41bd9c 100644 --- a/doc/html/boost/interprocess/segment_manager.html +++ b/doc/html/boost/interprocess/segment_manager.html @@ -3,9 +3,9 @@ Class template segment_manager - + - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext
@@ -29,7 +29,7 @@

boost::interprocess::segment_manager

Synopsis

-
// In header: <boost/interprocess/segment_manager.hpp>
+
// In header: <boost/interprocess/segment_manager.hpp>
 
 template<typename CharType, typename MemoryAlgorithm, 
          template< class IndexConfig > class IndexType> 
@@ -39,12 +39,12 @@
 public:
   // types
   typedef MemoryAlgorithm                                                                 memory_algorithm;         
-  typedef Base::void_pointer                                                              void_pointer;             
-  typedef Base::size_type                                                                 size_type;                
-  typedef Base::difference_type                                                           difference_type;          
+  typedef segment_manager_base_t::void_pointer                                            void_pointer;             
+  typedef segment_manager_base_t::size_type                                               size_type;                
+  typedef segment_manager_base_t::difference_type                                         difference_type;          
   typedef CharType                                                                        char_type;                
   typedef segment_manager_base< MemoryAlgorithm >                                         segment_manager_base_type;
-  typedef Base::mutex_family                                                              mutex_family;             
+  typedef segment_manager_base_t::mutex_family                                            mutex_family;             
   typedef transform_iterator< typename named_index_t::const_iterator, named_transform >   const_named_iterator;     
   typedef transform_iterator< typename unique_index_t::const_iterator, unique_transform > const_unique_iterator;    
 
@@ -61,240 +61,214 @@
   };
 
   // construct/copy/destruct
-  segment_manager(size_type);
+  explicit segment_manager(size_type);
 
-  // public member functions
-  template<typename T> std::pair< T *, size_type > find(const CharType *);
-  template<typename T> std::pair< T *, size_type > find(unspecified);
+  // public member functions
+  template<typename T> std::pair< T *, size_type > find(char_ptr_holder_t);
   template<typename T> 
-    std::pair< T *, size_type > find_no_lock(const CharType *);
-  template<typename T> std::pair< T *, size_type > find_no_lock(unspecified);
-  template<typename T> construct_proxy< T >::type construct(char_ptr_holder_t);
+    std::pair< T *, size_type > find_no_lock(char_ptr_holder_t);
+  template<typename T> construct_proxy< T >::type construct(char_ptr_holder_t);
   template<typename T> 
-    construct_proxy< T >::type find_or_construct(char_ptr_holder_t);
+    construct_proxy< T >::type find_or_construct(char_ptr_holder_t);
   template<typename T> 
-    construct_proxy< T >::type construct(char_ptr_holder_t, std::nothrow_t);
+    construct_proxy< T >::type construct(char_ptr_holder_t, std::nothrow_t);
   template<typename T> 
     construct_proxy< T >::type 
-    find_or_construct(char_ptr_holder_t, std::nothrow_t);
+    find_or_construct(char_ptr_holder_t, std::nothrow_t);
   template<typename T> 
-    construct_iter_proxy< T >::type construct_it(char_ptr_holder_t);
+    construct_iter_proxy< T >::type construct_it(char_ptr_holder_t);
   template<typename T> 
-    construct_iter_proxy< T >::type find_or_construct_it(char_ptr_holder_t);
+    construct_iter_proxy< T >::type find_or_construct_it(char_ptr_holder_t);
   template<typename T> 
     construct_iter_proxy< T >::type 
-    construct_it(char_ptr_holder_t, std::nothrow_t);
+    construct_it(char_ptr_holder_t, std::nothrow_t);
   template<typename T> 
     construct_iter_proxy< T >::type 
-    find_or_construct_it(char_ptr_holder_t, std::nothrow_t);
-  template<typename Func> *void atomic_func(Func &);
-  template<typename Func> bool try_atomic_func(Func &);
-  template<typename T> bool destroy(unspecified);
-  template<typename T> bool destroy(const CharType *);
-  template<typename T> void destroy_ptr(const T *);
-  void reserve_named_objects(size_type);
-  void reserve_unique_objects(size_type);
-  void shrink_to_fit_indexes();
-  size_type get_num_named_objects();
-  size_type get_num_unique_objects();
-  const_named_iterator named_begin() const;
-  const_named_iterator named_end() const;
-  const_unique_iterator unique_begin() const;
-  const_unique_iterator unique_end() const;
-  template<typename T> allocator< T >::type get_allocator();
-  template<typename T> deleter< T >::type get_deleter();
+    find_or_construct_it(char_ptr_holder_t, std::nothrow_t);
+  template<typename Func> void atomic_func(Func &);
+  template<typename Func> bool try_atomic_func(Func &);
+  template<typename T> bool destroy(char_ptr_holder_t);
+  template<typename T> void destroy_ptr(const T *);
+  void reserve_named_objects(size_type);
+  void reserve_unique_objects(size_type);
+  void shrink_to_fit_indexes();
+  size_type get_num_named_objects();
+  size_type get_num_unique_objects();
+  const_named_iterator named_begin() const;
+  const_named_iterator named_end() const;
+  const_unique_iterator unique_begin() const;
+  const_unique_iterator unique_end() const;
+  template<typename T> allocator< T >::type get_allocator();
+  template<typename T> deleter< T >::type get_deleter();
 
-  // public static functions
-  template<typename T> static const CharType * get_instance_name(const T *);
-  template<typename T> static size_type get_instance_length(const T *);
-  template<typename T> static instance_type get_instance_type(const T *);
-  static size_type get_min_size();
+  // public static functions
+  template<typename T> static const CharType * get_instance_name(const T *);
+  template<typename T> static size_type get_instance_length(const T *);
+  template<typename T> static instance_type get_instance_type(const T *);
+  static size_type get_min_size();
 
-  // public data members
-  static const size_type PayloadPerAllocation;
+  // public data members
+  static const size_type PayloadPerAllocation;
 };
-

Description

+

Description

This object is placed in the beginning of memory segment and implements the allocation (named or anonymous) of portions of the segment. This object contains two indexes that maintain an association between a name and a portion of the segment.

The first index contains the mappings for normal named objects using the char type specified in the template parameter.

The second index contains the association for unique instances. The key will be the const char * returned from type_info.name() function for the unique type to be constructed.

segment_manager<CharType, MemoryAlgorithm, IndexType> inherits publicly from segment_manager_base<MemoryAlgorithm> and inherits from it many public functions related to anonymous object and raw memory allocation. See segment_manager_base reference to know about those functions.

-

+

segment_manager public construct/copy/destruct

  1. -
    segment_manager(size_type size);
    +
    explicit segment_manager(size_type segment_size);

    Constructor of the segment manager "size" is the size of the memory segment where the segment manager is being constructed. Can throw

-

-segment_manager public member functions

+

+segment_manager public member functions

  1. -
    template<typename T> std::pair< T *, size_type > find(const CharType * name);
    -

    Tries to find a previous named allocation. Returns the address and the object count. On failure the first member of the returned pair is 0.

    -
  2. -
  3. -
    template<typename T> std::pair< T *, size_type > find(unspecified name);
    -

    Tries to find a previous unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0.

    +
    template<typename T> std::pair< T *, size_type > find(char_ptr_holder_t name);
    +

    Tries to find a previous named/unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0.

  4. template<typename T> 
    -  std::pair< T *, size_type > find_no_lock(const CharType * name);
    -

    Tries to find a previous named allocation. Returns the address and the object count. On failure the first member of the returned pair is 0. This search is not mutex-protected!

    + std::pair< T *, size_type > find_no_lock(char_ptr_holder_t name);
+

Tries to find a previous named/unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0. This search is not mutex-protected! Use it only inside atomic_func() calls, where the internal mutex is guaranteed to be locked.

  • template<typename T> 
    -  std::pair< T *, size_type > find_no_lock(unspecified name);
    -

    Tries to find a previous unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0. This search is not mutex-protected!

    -
  • -
  • -
    template<typename T> 
    -  construct_proxy< T >::type construct(char_ptr_holder_t name);
    + construct_proxy< T >::type construct(char_ptr_holder_t name);

    Returns throwing "construct" proxy object

  • template<typename T> 
    -  construct_proxy< T >::type find_or_construct(char_ptr_holder_t name);
    + construct_proxy< T >::type find_or_construct(char_ptr_holder_t name);

    Returns throwing "search or construct" proxy object

  • template<typename T> 
    -  construct_proxy< T >::type construct(char_ptr_holder_t name, std::nothrow_t);
    + construct_proxy< T >::type construct(char_ptr_holder_t name, std::nothrow_t);

    Returns no throwing "construct" proxy object

  • template<typename T> 
       construct_proxy< T >::type 
    -  find_or_construct(char_ptr_holder_t name, std::nothrow_t);
    + find_or_construct(char_ptr_holder_t name, std::nothrow_t);

    Returns no throwing "search or construct" proxy object

  • template<typename T> 
    -  construct_iter_proxy< T >::type construct_it(char_ptr_holder_t name);
    Returns throwing "construct from iterators" proxy object.
  • + construct_iter_proxy< T >::type construct_it(char_ptr_holder_t name);Returns throwing "construct from iterators" proxy object.
  • template<typename T> 
    -  construct_iter_proxy< T >::type find_or_construct_it(char_ptr_holder_t name);
    + construct_iter_proxy< T >::type find_or_construct_it(char_ptr_holder_t name);

    Returns throwing "search or construct from iterators" proxy object

  • template<typename T> 
       construct_iter_proxy< T >::type 
    -  construct_it(char_ptr_holder_t name, std::nothrow_t);
    + construct_it(char_ptr_holder_t name, std::nothrow_t);

    Returns no throwing "construct from iterators" proxy object

  • template<typename T> 
       construct_iter_proxy< T >::type 
    -  find_or_construct_it(char_ptr_holder_t name, std::nothrow_t);
    + find_or_construct_it(char_ptr_holder_t name, std::nothrow_t);

    Returns no throwing "search or construct from iterators" proxy object

  • -
    template<typename Func> *void atomic_func(Func & f);
    +
    template<typename Func> void atomic_func(Func & f);

    Calls object function blocking recursive interprocess_mutex and guarantees that no new named_alloc or destroy will be executed by any process while executing the object function call

  • -
    template<typename Func> bool try_atomic_func(Func & f);
    +
    template<typename Func> bool try_atomic_func(Func & f);

    Tries to calls a functor guaranteeing that no new construction, search or destruction will be executed by any process while executing the object function call. If the atomic function can't be immediatelly executed because the internal mutex is already locked, returns false. If the functor throws, this function throws.

  • -
    template<typename T> bool destroy(unspecified);
    -

    Destroys a previously created unique instance. Returns false if the object was not present.

    -
  • -
  • -
    template<typename T> bool destroy(const CharType * name);
    -

    Destroys the named object with the given name. Returns false if that object can't be found.

    +
    template<typename T> bool destroy(char_ptr_holder_t name);
    +

    Destroys a previously created named/unique instance. Returns false if the object was not present.

  • -
    template<typename T> void destroy_ptr(const T * p);
    -

    Destroys an anonymous, unique or named object using it's address

    +
    template<typename T> void destroy_ptr(const T * p);
    +

    Destroys an anonymous, unique or named object using its address

  • -
    void reserve_named_objects(size_type num);
    +
    void reserve_named_objects(size_type num);

    Preallocates needed index resources to optimize the creation of "num" named objects in the managed memory segment. Can throw boost::interprocess::bad_alloc if there is no enough memory.

  • -
    void reserve_unique_objects(size_type num);
    +
    void reserve_unique_objects(size_type num);

    Preallocates needed index resources to optimize the creation of "num" unique objects in the managed memory segment. Can throw boost::interprocess::bad_alloc if there is no enough memory.

  • -
    void shrink_to_fit_indexes();
    +
    void shrink_to_fit_indexes();

    Calls shrink_to_fit in both named and unique object indexes to try to free unused memory from those indexes.

  • -
    size_type get_num_named_objects();
    +
    size_type get_num_named_objects();

    Returns the number of named objects stored in the segment.

  • -
    size_type get_num_unique_objects();
    +
    size_type get_num_unique_objects();

    Returns the number of unique objects stored in the segment.

  • -
    const_named_iterator named_begin() const;
    +
    const_named_iterator named_begin() const;

    Returns a constant iterator to the beginning of the information about the named allocations performed in this segment manager

  • -
    const_named_iterator named_end() const;
    +
    const_named_iterator named_end() const;

    Returns a constant iterator to the end of the information about the named allocations performed in this segment manager

  • -
    const_unique_iterator unique_begin() const;
    +
    const_unique_iterator unique_begin() const;

    Returns a constant iterator to the beginning of the information about the unique allocations performed in this segment manager

  • -
    const_unique_iterator unique_end() const;
    +
    const_unique_iterator unique_end() const;

    Returns a constant iterator to the end of the information about the unique allocations performed in this segment manager

  • -
    template<typename T> allocator< T >::type get_allocator();
    +
    template<typename T> allocator< T >::type get_allocator();

    Returns an instance of the default allocator for type T initialized that allocates memory from this segment manager.

  • -
    template<typename T> deleter< T >::type get_deleter();
    -

    Returns an instance of the default allocator for type T initialized that allocates memory from this segment manager.

    +
    template<typename T> deleter< T >::type get_deleter();
    +

    Returns an instance of the default deleter for type T that will delete an object constructed in this segment manager.

  • -

    -segment_manager public static functions

    +

    +segment_manager public static functions

    1. -
      template<typename T> static const CharType * get_instance_name(const T * ptr);
      +
      template<typename T> static const CharType * get_instance_name(const T * ptr);

      Returns the name of an object created with construct/find_or_construct functions. Does not throw

    2. -
      template<typename T> static size_type get_instance_length(const T * ptr);
      +
      template<typename T> static size_type get_instance_length(const T * ptr);

      Returns the length of an object created with construct/find_or_construct functions. Does not throw.

    3. -
      template<typename T> static instance_type get_instance_type(const T * ptr);
      +
      template<typename T> static instance_type get_instance_type(const T * ptr);

      Returns is the the name of an object created with construct/find_or_construct functions. Does not throw

    4. -
      static size_type get_min_size();
      +
      static size_type get_min_size();

      Obtains the minimum size needed by the segment manager

    -
    -

    -segment_manager - public - public data members

    -
    1. -
      static const size_type PayloadPerAllocation;
      -

      This constant indicates the payload size associated with each allocation of the memory algorithm

      -
    -
    -

    -PrevUpHomeNext +PrevUpHomeNext