Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53081 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-05-18 04:08:47


Author: xushiwei
Date: 2009-05-18 04:08:45 EDT (Mon, 18 May 2009)
New Revision: 53081
URL: http://svn.boost.org/trac/boost/changeset/53081

Log:
aaa
Text files modified:
   sandbox/memory/boost/memory/block_pool.hpp | 8 +++++---
   sandbox/memory/boost/memory/fixed_alloc.hpp | 7 ++++---
   2 files changed, 9 insertions(+), 6 deletions(-)

Modified: sandbox/memory/boost/memory/block_pool.hpp
==============================================================================
--- sandbox/memory/boost/memory/block_pool.hpp (original)
+++ sandbox/memory/boost/memory/block_pool.hpp 2009-05-18 04:08:45 EDT (Mon, 18 May 2009)
@@ -29,7 +29,7 @@
 // -------------------------------------------------------------------------
 // class proxy_alloc
 
-template <class AllocT, class TlsAllocT>
+template <class AllocT, class TlsAllocT = void>
 class proxy_alloc
 {
 private:
@@ -54,6 +54,8 @@
 // -------------------------------------------------------------------------
 // class block_pool
 
+#pragma pack(1)
+
 template <class PolicyT>
 class block_pool_
 {
@@ -61,11 +63,9 @@
         typedef typename PolicyT::alloc_type AllocT;
         enum { m_cbBlock = PolicyT::MemBlockBytes - AllocT::Padding };
 
-#pragma pack(1)
         struct Block {
                 Block* next;
         };
-#pragma pack()
 
         Block* m_freeList;
 
@@ -144,6 +144,8 @@
 
 typedef block_pool_<NS_BOOST_MEMORY_POLICY::sys> block_pool;
 
+#pragma pack()
+
 // -------------------------------------------------------------------------
 // class tls_block_pool
 

Modified: sandbox/memory/boost/memory/fixed_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/fixed_alloc.hpp (original)
+++ sandbox/memory/boost/memory/fixed_alloc.hpp 2009-05-18 04:08:45 EDT (Mon, 18 May 2009)
@@ -25,6 +25,8 @@
 // -------------------------------------------------------------------------
 // class fixed_alloc
 
+#pragma pack(1)
+
 #ifndef ROUND
 #define ROUND(x, y) (((x)+((y)-1)) & ~((y)-1))
 #endif
@@ -49,7 +51,6 @@
         typedef AllocT alloc_type;
         typedef size_t size_type;
 
-#pragma pack(1)
 protected:
         struct MemBlock;
         friend struct MemBlock;
@@ -79,8 +80,6 @@
         enum { ChunkHeaderSize = sizeof(ChunkHeader) };
         enum { MinElemBytes = sizeof(FreeChunk) };
 
-#pragma pack()
-
         dcl_list<FreeChunk> m_freelist;
         dcl_list<MemBlock> m_blks;
         AllocT m_alloc;
@@ -198,6 +197,8 @@
         }
 };
 
+#pragma pack()
+
 // -------------------------------------------------------------------------
 // $Log: $
 


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