Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57674 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-11-15 03:29:01


Author: xushiwei
Date: 2009-11-15 03:29:00 EST (Sun, 15 Nov 2009)
New Revision: 57674
URL: http://svn.boost.org/trac/boost/changeset/57674

Log:
pools - log2
Text files modified:
   sandbox/memory/boost/memory/pool_alloc.hpp | 2 --
   sandbox/memory/boost/memory/pools.hpp | 4 ++--
   2 files changed, 2 insertions(+), 4 deletions(-)

Modified: sandbox/memory/boost/memory/pool_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/pool_alloc.hpp (original)
+++ sandbox/memory/boost/memory/pool_alloc.hpp 2009-11-15 03:29:00 EST (Sun, 15 Nov 2009)
@@ -128,8 +128,6 @@
                 blk->pPrev = m_blks;
                 m_blks = blk;
 
- blk->nUsed = 0;
-
                 FreeChunk* p = (FreeChunk*)blk->buffer;
                 p->pPrev = m_freelist;
                 for (size_type i = m_nChunkPerBlock; --i;)

Modified: sandbox/memory/boost/memory/pools.hpp
==============================================================================
--- sandbox/memory/boost/memory/pools.hpp (original)
+++ sandbox/memory/boost/memory/pools.hpp 2009-11-15 03:29:00 EST (Sun, 15 Nov 2009)
@@ -47,11 +47,11 @@
 #pragma warning(pop)
 #endif
 
-#else if defined(__GNUG__) || defined(__GNUC__) // g++/gcc
+#elif defined(__GNUG__) || defined(__GNUC__) // g++/gcc
 
 __forceinline unsigned int log2(IN unsigned int val) {
         BOOST_MEMORY_ASSERT(val != 0);
- asm(bsr $val, %eax);
+ __asm__ volatile("bsr %0, %%eax"::"m"(val));
 }
 
 #else


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