Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56167 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-09-13 07:28:20


Author: xushiwei
Date: 2009-09-13 07:28:19 EDT (Sun, 13 Sep 2009)
New Revision: 56167
URL: http://svn.boost.org/trac/boost/changeset/56167

Log:
member_size => alloc_size
Text files modified:
   sandbox/memory/boost/memory/fixed_alloc.hpp | 10 +++++-----
   sandbox/memory/boost/memory/object_pool.hpp | 2 +-
   2 files changed, 6 insertions(+), 6 deletions(-)

Modified: sandbox/memory/boost/memory/fixed_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/fixed_alloc.hpp (original)
+++ sandbox/memory/boost/memory/fixed_alloc.hpp 2009-09-13 07:28:19 EDT (Sun, 13 Sep 2009)
@@ -122,7 +122,7 @@
                 clear();
         }
 
- size_type BOOST_MEMORY_CALL element_size() const
+ size_type BOOST_MEMORY_CALL alloc_size() const
         {
                 return m_cbChunk - ChunkHeaderSize;
         }
@@ -191,13 +191,13 @@
                 ++chunkHeader_(p)->nUsed;
                 m_freelist.pop_front();
                 
- BOOST_MEMORY_DBG_FILL(p, element_size());
+ BOOST_MEMORY_DBG_FILL(p, alloc_size());
                 return p;
         }
 
         __forceinline void* BOOST_MEMORY_CALL allocate(size_t cb)
         {
- BOOST_MEMORY_ASSERT(cb <= element_size());
+ BOOST_MEMORY_ASSERT(cb <= alloc_size());
                 return allocate();
         }
 
@@ -206,7 +206,7 @@
                 MemBlock* const blk = chunkHeader_(p);
 
                 BOOST_MEMORY_ASSERT(blk->nUsed > 0 && blk->nUsed <= m_nChunkPerBlock);
- BOOST_MEMORY_DBG_FILL(p, element_size());
+ BOOST_MEMORY_DBG_FILL(p, alloc_size());
 
                 m_freelist.push_back((FreeChunk*)p); // NOTE: we don't use push_front! why?
                 if (--blk->nUsed == 0 && blk != m_lastBlock)
@@ -215,7 +215,7 @@
 
         __forceinline void BOOST_MEMORY_CALL deallocate(void* const p, size_t cb)
         {
- BOOST_MEMORY_ASSERT(cb == element_size());
+ BOOST_MEMORY_ASSERT(cb == alloc_size());
                 deallocate(p);
         }
 };

Modified: sandbox/memory/boost/memory/object_pool.hpp
==============================================================================
--- sandbox/memory/boost/memory/object_pool.hpp (original)
+++ sandbox/memory/boost/memory/object_pool.hpp 2009-09-13 07:28:19 EDT (Sun, 13 Sep 2009)
@@ -43,7 +43,7 @@
         typedef typename PoolT::alloc_type alloc_type;
         typedef typename PoolT::size_type size_type;
         
- using PoolT::element_size;
+ using PoolT::alloc_size;
         using PoolT::get_alloc;
         
 protected:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk