|
Boost-Commit : |
From: xushiweizh_at_[hidden]
Date: 2008-05-04 11:26:42
Author: xushiwei
Date: 2008-05-04 11:26:41 EDT (Sun, 04 May 2008)
New Revision: 45110
URL: http://svn.boost.org/trac/boost/changeset/45110
Log:
NS_BOOST_MEMORY_POLICY
Text files modified:
sandbox/memory/boost/memory/policy.hpp | 2 +-
sandbox/memory/libs/memory/test/memory/simple_examples.cpp | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
Modified: sandbox/memory/boost/memory/policy.hpp
==============================================================================
--- sandbox/memory/boost/memory/policy.hpp (original)
+++ sandbox/memory/boost/memory/policy.hpp 2008-05-04 11:26:41 EDT (Sun, 04 May 2008)
@@ -120,7 +120,7 @@
#ifndef NS_BOOST_MEMORY_POLICY_BEGIN
#define NS_BOOST_MEMORY_POLICY_BEGIN namespace policy {
#define NS_BOOST_MEMORY_POLICY_END }
-#define NS_BOOST_MEMORY_POLICY policy
+#define NS_BOOST_MEMORY_POLICY boost::memory::policy
#endif
NS_BOOST_MEMORY_POLICY_BEGIN
Modified: sandbox/memory/libs/memory/test/memory/simple_examples.cpp
==============================================================================
--- sandbox/memory/libs/memory/test/memory/simple_examples.cpp (original)
+++ sandbox/memory/libs/memory/test/memory/simple_examples.cpp 2008-05-04 11:26:41 EDT (Sun, 04 May 2008)
@@ -69,7 +69,7 @@
int* intBuf = BOOST_ALLOC(alloc, int);
int* intArrayBuf = BOOST_ALLOC_ARRAY(alloc, int, 100);
- enum { AllocSizeHuge = boost::memory::policy::sys::AllocSizeHuge };
+ enum { AllocSizeHuge = NS_BOOST_MEMORY_POLICY::sys::AllocSizeHuge };
char* hugeBuf = BOOST_NEW_ARRAY(alloc, char, AllocSizeHuge); // > HugeSize
boost::gc_alloc* suballoc = BOOST_NEW(alloc, boost::gc_alloc);
@@ -93,9 +93,8 @@
void simpleExamples()
{
boost::enableMemoryLeakCheck();
-// _CrtSetBreakAlloc(51);
-// testAutoAlloc();
-// testScopedAlloc();
-// testTlsScopedAlloc();
+ testAutoAlloc();
+ testScopedAlloc();
+ testTlsScopedAlloc();
testGCAlloc();
}
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