| Home | Libraries | People | FAQ | More

## Class template map_index

boost::interprocess::map_index

## Synopsis

    template<typename MapConfig>
    class map_index : public boost::interprocess::map< key_type, mapped_type, key_less, allocator_type >
    {
    public:
      // construct/copy/destruct
      map_index(segment_manager_base *);

      // public member functions
      void reserve(std::size_t) ;
      void shrink_to_fit() ;
    };

## Description

Index type based in boost::interprocess::map. Just derives from boost::interprocess::map and defines the interface needed by managed memory segments

### `map_index` public construct/copy/destruct

1.     map_index(segment_manager_base * segment_mngr);

   Constructor. Takes a pointer to the segment manager. Can throw

### `map_index` public member functions

1.     void reserve(std::size_t) ;

   This reserves memory to optimize the insertion of n elements in the index

2.     void shrink_to_fit() ;

   This tries to free previously allocate unused memory.