[Avida-cvs] [avida-svn] r527 - in development: Avida.xcodeproj source/main source/platform/tcmalloc

brysonda@myxo.css.msu.edu brysonda at myxo.css.msu.edu
Fri Mar 24 18:58:42 PST 2006


Author: brysonda
Date: 2006-03-24 21:58:41 -0500 (Fri, 24 Mar 2006)
New Revision: 527

Modified:
   development/Avida.xcodeproj/project.pbxproj
   development/source/main/cBirthChamber.cc
   development/source/platform/tcmalloc/tcmalloc.cc
Log:
Add tcmalloc into 'avida' target (Xcode only).   Also, fix cBirthChamber bug.

Modified: development/Avida.xcodeproj/project.pbxproj
===================================================================
--- development/Avida.xcodeproj/project.pbxproj	2006-03-24 21:32:24 UTC (rev 526)
+++ development/Avida.xcodeproj/project.pbxproj	2006-03-25 02:58:41 UTC (rev 527)
@@ -396,15 +396,7 @@
 		70DCAD16097AF7CC002F8733 /* avida.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7013852C0902E36B0087ED2E /* avida.cfg */; };
 		70DCAD25097AF81A002F8733 /* cLexer.l in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAD21097AF81A002F8733 /* cLexer.l */; };
 		70DCAD2F097AF8BC002F8733 /* main.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC57097AF730002F8733 /* main.cc */; };
-		70DCF50509CFB0B400924128 /* system-alloc.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70DCF50109CFB0B400924128 /* system-alloc.h */; };
-		70DCF50609CFB0B400924128 /* system-alloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF50209CFB0B400924128 /* system-alloc.cc */; };
-		70DCF50709CFB0B400924128 /* system-alloc.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70DCF50109CFB0B400924128 /* system-alloc.h */; };
-		70DCF50809CFB0B400924128 /* system-alloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF50209CFB0B400924128 /* system-alloc.cc */; };
-		70DCF52A09CFB93200924128 /* spinlock.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70DCF52809CFB93200924128 /* spinlock.h */; };
-		70DCF52B09CFB93200924128 /* spinlock.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70DCF52809CFB93200924128 /* spinlock.h */; };
-		70DCF56409CFBB9500924128 /* tcmalloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF56309CFBB9500924128 /* tcmalloc.cc */; };
-		70DCF58109CFBD4600924128 /* tcmalloc-logging.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF57F09CFBD3D00924128 /* tcmalloc-logging.cc */; };
-		70DCF58209CFBD4800924128 /* system-alloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF50209CFB0B400924128 /* system-alloc.cc */; };
+		70DCF66C09D4DE6500924128 /* libtcmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70AA941909D486AE006A24C8 /* libtcmalloc.a */; };
 		70F7D8CE09254787009E311D /* cFitnessMatrix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70CA6EB208DB7F8200068AC2 /* cFitnessMatrix.cc */; };
 		70F7DAF409290468009E311D /* cClassificationManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70F7DAF009290468009E311D /* cClassificationManager.cc */; };
 		70F7DCA009293E76009E311D /* cClassificationManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70F7DAF009290468009E311D /* cClassificationManager.cc */; };
@@ -456,6 +448,16 @@
 		};
 /* End PBXBuildStyle section */
 
+/* Begin PBXContainerItemProxy section */
+		70DCF67509D4E10500924128 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 70AA941809D486AE006A24C8 /* tcmalloc */;
+			remoteInfo = tcmalloc;
+		};
+/* End PBXContainerItemProxy section */
+
 /* Begin PBXCopyFilesBuildPhase section */
 		700E2B6D085DE50C00CF158A /* CopyFiles */ = {
 			isa = PBXCopyFilesBuildPhase;
@@ -487,8 +489,6 @@
 				7005A70509BA0FA90007E16E /* cTestCPUInterface.h in CopyFiles */,
 				7005A70B09BA0FBE0007E16E /* cOrgInterface.h in CopyFiles */,
 				701D51D109C645F50009B4F8 /* cAvidaContext.h in CopyFiles */,
-				70DCF50709CFB0B400924128 /* system-alloc.h in CopyFiles */,
-				70DCF52B09CFB93200924128 /* spinlock.h in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -545,8 +545,6 @@
 				7005A70309BA0FA90007E16E /* cTestCPUInterface.h in CopyFiles */,
 				7005A70A09BA0FBE0007E16E /* cOrgInterface.h in CopyFiles */,
 				701D51CF09C645F50009B4F8 /* cAvidaContext.h in CopyFiles */,
-				70DCF50509CFB0B400924128 /* system-alloc.h in CopyFiles */,
-				70DCF52A09CFB93200924128 /* spinlock.h in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1041,6 +1039,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				70DCF66C09D4DE6500924128 /* libtcmalloc.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1881,6 +1880,7 @@
 				ZERO_LINK = YES;
 			};
 			dependencies = (
+				70DCF67609D4E10500924128 /* PBXTargetDependency */,
 			);
 			name = avida;
 			productName = primitive;
@@ -2076,7 +2076,6 @@
 				7054A17309A8014600038658 /* cAnalyzeJobQueue.cc in Sources */,
 				7054A1B809A810CB00038658 /* cAnalyzeJobWorker.cc in Sources */,
 				7005A70609BA0FA90007E16E /* cTestCPUInterface.cc in Sources */,
-				70DCF50809CFB0B400924128 /* system-alloc.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2205,7 +2204,6 @@
 				7054A17109A8014600038658 /* cAnalyzeJobQueue.cc in Sources */,
 				7054A1B609A810CB00038658 /* cAnalyzeJobWorker.cc in Sources */,
 				7005A70409BA0FA90007E16E /* cTestCPUInterface.cc in Sources */,
-				70DCF50609CFB0B400924128 /* system-alloc.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2318,14 +2316,19 @@
 				7054A1BA09A810CB00038658 /* cAnalyzeJobWorker.cc in Sources */,
 				7005A70809BA0FA90007E16E /* cTestCPUInterface.cc in Sources */,
 				7005A83209BA621F0007E16E /* cOrgMessage.cc in Sources */,
-				70DCF56409CFBB9500924128 /* tcmalloc.cc in Sources */,
-				70DCF58109CFBD4600924128 /* tcmalloc-logging.cc in Sources */,
-				70DCF58209CFBD4800924128 /* system-alloc.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
+/* Begin PBXTargetDependency section */
+		70DCF67609D4E10500924128 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 70AA941809D486AE006A24C8 /* tcmalloc */;
+			targetProxy = 70DCF67509D4E10500924128 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
 /* Begin XCBuildConfiguration section */
 		700E2B7F085DE50C00CF158A /* Development */ = {
 			isa = XCBuildConfiguration;
@@ -2389,6 +2392,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_MODEL_CPU = G4;
+				OTHER_LDFLAGS = (
+					"-multiply_defined",
+					suppress,
+				);
 				PRODUCT_NAME = avida;
 			};
 			name = Development;
@@ -2397,6 +2404,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_MODEL_CPU = G4;
+				OTHER_LDFLAGS = (
+					"-multiply_defined",
+					suppress,
+				);
 				PRODUCT_NAME = avida;
 			};
 			name = "Deployment-G4";
@@ -2418,6 +2429,7 @@
 				GCC_STRICT_ALIASING = YES;
 				GCC_UNROLL_LOOPS = YES;
 				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+				PREBINDING = NO;
 				WARNING_CFLAGS = (
 					"-Wmost",
 					"-Wno-four-char-constants",
@@ -2442,6 +2454,7 @@
 				);
 				GCC_STRICT_ALIASING = YES;
 				GCC_UNROLL_LOOPS = YES;
+				PREBINDING = NO;
 				WARNING_CFLAGS = (
 					"-Wmost",
 					"-Wno-four-char-constants",
@@ -2507,6 +2520,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_MODEL_CPU = G4;
+				OTHER_LDFLAGS = (
+					"-multiply_defined",
+					suppress,
+				);
 				PRODUCT_NAME = avida;
 			};
 			name = "Deployment-G5";
@@ -2515,6 +2532,10 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				GCC_MODEL_CPU = G4;
+				OTHER_LDFLAGS = (
+					"-multiply_defined",
+					suppress,
+				);
 				PRODUCT_NAME = avida;
 			};
 			name = Profile;
@@ -2593,6 +2614,7 @@
 				);
 				GCC_STRICT_ALIASING = YES;
 				GCC_UNROLL_LOOPS = YES;
+				PREBINDING = NO;
 				WARNING_CFLAGS = (
 					"-Wmost",
 					"-Wno-four-char-constants",
@@ -2618,6 +2640,7 @@
 				GCC_STRICT_ALIASING = YES;
 				GCC_UNROLL_LOOPS = YES;
 				OTHER_CFLAGS = "-falign-loops=16";
+				PREBINDING = NO;
 				WARNING_CFLAGS = (
 					"-Wmost",
 					"-Wno-four-char-constants",

Modified: development/source/main/cBirthChamber.cc
===================================================================
--- development/source/main/cBirthChamber.cc	2006-03-24 21:32:24 UTC (rev 526)
+++ development/source/main/cBirthChamber.cc	2006-03-25 02:58:41 UTC (rev 527)
@@ -104,11 +104,11 @@
 
 void cBirthChamber::GenomeSwap(cCPUMemory& genome0, cCPUMemory& genome1, double& merit0, double& merit1)
 {
-  cCPUMemory& genome0_tmp = genome0;
+  cCPUMemory genome0_tmp = genome0;
   genome0 = genome1; 
   genome1 = genome0_tmp; 
 
-  double& merit0_tmp = merit0; 
+  double merit0_tmp = merit0; 
   merit0 = merit1; 
   merit1 = merit0_tmp;
 }

Modified: development/source/platform/tcmalloc/tcmalloc.cc
===================================================================
--- development/source/platform/tcmalloc/tcmalloc.cc	2006-03-24 21:32:24 UTC (rev 526)
+++ development/source/platform/tcmalloc/tcmalloc.cc	2006-03-25 02:58:41 UTC (rev 527)
@@ -1698,6 +1698,9 @@
   // object declared below.
   SpinLockHolder h(&pageheap_lock);
   if (!phinited) {
+    if (TCMallocDebug::level >= TCMallocDebug::kInfo) {
+      MESSAGE("TCMalloc_ThreadCache::InitModule()\n");
+    }
     InitSizeClasses();
     threadheap_allocator.Init();
     span_allocator.Init();




More information about the Avida-cvs mailing list