Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50478 - in sandbox/memory: boost libs/memory/build libs/memory/lib libs/memory/test/test_basic/memory
From: xushiweizh_at_[hidden]
Date: 2009-01-05 05:23:24


Author: xushiwei
Date: 2009-01-05 05:23:23 EST (Mon, 05 Jan 2009)
New Revision: 50478
URL: http://svn.boost.org/trac/boost/changeset/50478

Log:
boost-memory for vs2008
Added:
   sandbox/memory/libs/memory/build/vc9-win32.vcproj (contents, props changed)
Removed:
   sandbox/memory/libs/memory/test/test_basic/memory/simple_examples.cpp
   sandbox/memory/libs/memory/test/test_basic/memory/stl_containers.cpp
Binary files modified:
   sandbox/memory/libs/memory/lib/boost-memory.lib
Text files modified:
   sandbox/memory/boost/memory.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: sandbox/memory/boost/memory.hpp
==============================================================================
--- sandbox/memory/boost/memory.hpp (original)
+++ sandbox/memory/boost/memory.hpp 2009-01-05 05:23:23 EST (Mon, 05 Jan 2009)
@@ -45,7 +45,7 @@
 
 NS_BOOST_MEMORY_BEGIN
 
-inline void winx_call swap(void* a, void* b, size_t cb)
+inline void swap(void* a, void* b, size_t cb)
 {
         void* t = _alloca(cb);
         memcpy(t, a, cb);
@@ -54,7 +54,7 @@
 }
 
 template <class Type>
-void winx_call swap_object(Type* a, Type* b) {
+void swap_object(Type* a, Type* b) {
         swap(a, b, sizeof(Type));
 }
 

Added: sandbox/memory/libs/memory/build/vc9-win32.vcproj
==============================================================================
--- (empty file)
+++ sandbox/memory/libs/memory/build/vc9-win32.vcproj 2009-01-05 05:23:23 EST (Mon, 05 Jan 2009)
@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="memory"
+ ProjectGUID="{96CB3825-EEFF-4993-AF42-FDE2865032C8}"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\lib"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\lib/vc6.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STDEXT_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Release/vc6.pch"
+ AssemblerOutput="4"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../bin/win32/boost-memory.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\build.def"
+ ProgramDatabaseFile="../lib/boost-memory.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="../lib/boost-memory.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\lib/vc6.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="ReleaseCS|Win32"
+ OutputDirectory=".\ReleaseCS"
+ IntermediateDirectory=".\ReleaseCS"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\ReleaseCS/vc6.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;STDEXT_EXPORTS;BOOST_MEMORY_NO_LOCKFREE"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\ReleaseCS/vc6.pch"
+ AssemblerListingLocation=".\ReleaseCS/"
+ ObjectFile=".\ReleaseCS/"
+ ProgramDataBaseFileName=".\ReleaseCS/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../bin/win32/boost-memory-cs.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\build.def"
+ ProgramDatabaseFile=".\ReleaseCS/boost-memory-cs.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\ReleaseCS/boost-memory-cs.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\ReleaseCS/vc6.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\lib"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\lib/vc6.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;STDEXT_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="stdafx.h"
+ PrecompiledHeaderFile=".\Debug/vc6.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../bin/win32d/boost-memory.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ModuleDefinitionFile=".\build.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="../lib/boost-memory.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="../lib/boost-memory.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\lib/vc6.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="memory"
+ >
+ <File
+ RelativePath="..\src\block_pool.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseCS|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="misc"
+ >
+ <File
+ RelativePath="build.def"
+ >
+ </File>
+ <File
+ RelativePath="..\src\stdafx.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="stdafx.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="ReleaseCS|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="stdafx.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="stdafx.h"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/memory/libs/memory/lib/boost-memory.lib
==============================================================================
Binary files. No diff available.

Deleted: sandbox/memory/libs/memory/test/test_basic/memory/simple_examples.cpp
==============================================================================
--- sandbox/memory/libs/memory/test/test_basic/memory/simple_examples.cpp 2009-01-05 05:23:23 EST (Mon, 05 Jan 2009)
+++ (empty file)
@@ -1,100 +0,0 @@
-//
-// simple_examples.cpp
-//
-// Copyright (c) 2004 - 2008 xushiwei (xushiweizh_at_[hidden])
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/memory/index.htm for documentation.
-//
-#define BOOST_MEMORY_DEBUG_GC
-#include <boost/memory.hpp>
-
-// -------------------------------------------------------------------------
-// TestCase
-
-void testAutoAlloc()
-{
- boost::auto_alloc alloc;
- int* intObj = BOOST_NEW(alloc, int);
- int* intObjWithArg = BOOST_NEW(alloc, int)(10);
- int* intArray = BOOST_NEW_ARRAY(alloc, int, 100);
- int* intBuf = BOOST_ALLOC(alloc, int);
- int* intArrayBuf = BOOST_ALLOC_ARRAY(alloc, int, 100);
-
- boost::auto_alloc* subAlloc = BOOST_NEW(alloc, boost::auto_alloc);
- int* e = BOOST_NEW(*subAlloc, int);
-}
-
-void testScopedAlloc()
-{
- NS_BOOST_MEMORY::block_pool recycle;
- boost::scoped_alloc alloc(recycle);
-
- int* intObj = BOOST_NEW(alloc, int);
- int* intObjWithArg = BOOST_NEW(alloc, int)(10);
- int* intArray = BOOST_NEW_ARRAY(alloc, int, 100);
- int* intBuf = BOOST_ALLOC(alloc, int);
- int* intArrayBuf = BOOST_ALLOC_ARRAY(alloc, int, 100);
-
- boost::scoped_alloc* suballoc = BOOST_NEW(alloc, boost::scoped_alloc)(alloc);
- int* e = BOOST_NEW(*suballoc, int);
-}
-
-void testTlsScopedAlloc()
-{
- boost::scoped_alloc alloc;
- // same as: boost::scoped_alloc(boost::tls_block_pool::instance());
-
- int* intObj = BOOST_NEW(alloc, int);
- int* intObjWithArg = BOOST_NEW(alloc, int)(10);
- int* intArray = BOOST_NEW_ARRAY(alloc, int, 100);
- int* intBuf = BOOST_ALLOC(alloc, int);
- int* intArrayBuf = BOOST_ALLOC_ARRAY(alloc, int, 100);
-
- boost::scoped_alloc* suballoc = BOOST_NEW(alloc, boost::scoped_alloc);
- int* e = BOOST_NEW(*suballoc, int);
-}
-
-void testGCAlloc()
-{
- boost::gc_alloc alloc;
- // same as: boost::gc_alloc(boost::tls_block_pool::instance());
-
- int* intObj = BOOST_NEW(alloc, int);
- int* intObjWithArg = BOOST_NEW(alloc, int)(10);
- int* intArray = BOOST_NEW_ARRAY(alloc, int, 10000); // > BlockSize
- int* intBuf = BOOST_ALLOC(alloc, int);
- int* intArrayBuf = BOOST_ALLOC_ARRAY(alloc, int, 100);
-
- 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);
- int* e = BOOST_NEW(*suballoc, int);
-
- boost::gc_alloc* allocArray = BOOST_NEW_ARRAY(alloc, boost::gc_alloc, 10);
-
- alloc.destroyArray(intArray, 10000);
- alloc.destroyArray(allocArray, 10);
-
- int i;
- for (i = 0; i < 1000; ++i)
- BOOST_NEW_ARRAY(alloc, int, 100);
- for (i = 0; i < 8000; ++i)
- BOOST_NEW(alloc, int);
-
- boost::gc_alloc alloc2;
- alloc.swap(alloc2);
-}
-
-void simpleExamples()
-{
- boost::enableMemoryLeakCheck();
- testAutoAlloc();
- testScopedAlloc();
- testTlsScopedAlloc();
- testGCAlloc();
-}

Deleted: sandbox/memory/libs/memory/test/test_basic/memory/stl_containers.cpp
==============================================================================
--- sandbox/memory/libs/memory/test/test_basic/memory/stl_containers.cpp 2009-01-05 05:23:23 EST (Mon, 05 Jan 2009)
+++ (empty file)
@@ -1,69 +0,0 @@
-//
-// stl_contianers.cpp
-//
-// Copyright (c) 2004 - 2008 xushiwei (xushiweizh_at_[hidden])
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/memory/index.htm for documentation.
-//
-
-#pragma warning(disable:4786)
-#include <boost/memory.hpp>
-#include <set>
-#include <map>
-#include <list>
-#include <deque>
-#include <cstdio>
-
-using boost::stl_allocator;
-
-// -------------------------------------------------------------------------
-
-enum { Count = 1000000 };
-
-void testDeque()
-{
- printf("\n===== Deque (scoped_alloc) =====\n");
- boost::scoped_alloc alloc;
- std::deque<int, stl_allocator<int> > s(alloc);
- for (int i = 0; i < Count; ++i)
- s.push_back(i);
-}
-
-void testList()
-{
- printf("\n===== List (scoped_alloc) =====\n");
- boost::scoped_alloc alloc;
- std::list<int, stl_allocator<int> > s(alloc);
- for (int i = 0; i < Count; ++i)
- s.push_back(i);
-}
-
-void testSet()
-{
- printf("\n===== Set (scoped_alloc) =====\n");
- boost::scoped_alloc alloc;
- std::set<int, std::less<int>, stl_allocator<int> > s(std::less<int>(), alloc);
- for (int i = 0; i < Count; ++i)
- s.insert(i);
-}
-
-void testMap()
-{
- printf("\n===== Map (scoped_alloc) =====\n");
- boost::scoped_alloc alloc;
- std::map<int, int, std::less<int>, stl_allocator<int> > s(std::less<int>(), alloc);
- for (int i = 0; i < Count; ++i)
- s.insert(std::pair<int, int>(i, i));
-}
-
-void testStlContainers()
-{
- testDeque();
- testList();
- testSet();
- testMap();
-}


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