Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56059 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-09-06 05:38:45


Author: xushiwei
Date: 2009-09-06 05:38:44 EDT (Sun, 06 Sep 2009)
New Revision: 56059
URL: http://svn.boost.org/trac/boost/changeset/56059

Log:
region_alloc/fixed_alloc::deallocate
Text files modified:
   sandbox/memory/boost/memory/auto_alloc.hpp | 4 ++++
   sandbox/memory/boost/memory/fixed_alloc.hpp | 6 ++++++
   sandbox/memory/boost/memory/region_alloc.hpp | 5 +++++
   3 files changed, 15 insertions(+), 0 deletions(-)

Modified: sandbox/memory/boost/memory/auto_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/auto_alloc.hpp (original)
+++ sandbox/memory/boost/memory/auto_alloc.hpp 2009-09-06 05:38:44 EDT (Sun, 06 Sep 2009)
@@ -83,6 +83,10 @@
                 // no action
         }
 
+ void BOOST_MEMORY_CALL deallocate(void* p) {
+ // no action
+ }
+
         template <class Type>
         void BOOST_MEMORY_CALL destroy(Type* obj) {
                 // no action

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-06 05:38:44 EDT (Sun, 06 Sep 2009)
@@ -212,6 +212,12 @@
                 if (--blk->nUsed == 0 && blk != m_lastBlock)
                         do_deallocate_block_(blk);
         }
+
+ __forceinline void BOOST_MEMORY_CALL deallocate(void* const p, size_t cb)
+ {
+ BOOST_MEMORY_ASSERT(cb == element_size());
+ deallocate(p);
+ }
 };
 
 #pragma pack()

Modified: sandbox/memory/boost/memory/region_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/region_alloc.hpp (original)
+++ sandbox/memory/boost/memory/region_alloc.hpp 2009-09-06 05:38:44 EDT (Sun, 06 Sep 2009)
@@ -214,6 +214,11 @@
                 return p2;
         }
 
+ void BOOST_MEMORY_CALL deallocate(void* p)
+ {
+ // no action
+ }
+
         void BOOST_MEMORY_CALL deallocate(void* p, size_t cb)
         {
                 // no action


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