Update of /cvsroot/boost/boost/boost/interprocess/indexes
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22035/indexes
Modified Files:
null_index.hpp unordered_map_index.hpp
Log Message:
New Interprocess version
Index: null_index.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/indexes/null_index.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- null_index.hpp 12 Jun 2007 17:07:09 -0000 1.4
+++ null_index.hpp 22 Jul 2007 14:06:01 -0000 1.5
@@ -28,7 +28,7 @@
{
/// @cond
typedef typename MapConfig::
- basic_segment_manager basic_segment_manager;
+ segment_manager_base segment_manager_base;
/// @endcond
public:
@@ -48,7 +48,7 @@
{ return iterator(0); }
/*!Dummy function*/
- null_index(basic_segment_manager *){}
+ null_index(segment_manager_base *){}
};
}} //namespace boost { namespace interprocess {
Index: unordered_map_index.hpp
===================================================================
RCS file:
/cvsroot/boost/boost/boost/interprocess/indexes/unordered_map_index.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- unordered_map_index.hpp 12 Jun 2007 17:07:09 -0000 1.5
+++ unordered_map_index.hpp 22 Jul 2007 14:06:02 -0000 1.6
@@ -38,7 +38,7 @@
typedef private_adaptive_pool
<value_type,
typename MapConfig::
- basic_segment_manager> allocator_type;
+ segment_manager_base> allocator_type;
struct hasher
: std::unary_function<key_type, std::size_t>
{
@@ -65,13 +65,13 @@
typedef unordered_map_index_aux<MapConfig> index_aux;
typedef typename index_aux::index_t base_type;
typedef typename
- MapConfig::basic_segment_manager basic_segment_manager;
+ MapConfig::segment_manager_base segment_manager_base;
/// @endcond
public:
/*!Constructor. Takes a pointer to the
segment manager. Can throw*/
- unordered_map_index(basic_segment_manager *segment_mngr)
+ unordered_map_index(segment_manager_base *segment_mngr)
: base_type(0,
typename index_aux::hasher(),
typename index_aux::key_equal(),
@@ -80,7 +80,12 @@
/*!This reserves memory to optimize the insertion of n
elements in the index*/
void reserve(std::size_t n)
- { base_type::rehash(n); }
+ { base_type::rehash(n); }
+
+ //!This tries to free previously allocate
+ //!unused memory.
+ void shrink_to_fit()
+ { base_type::rehash(base_type::size()); }
};
/// @cond
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs