[Avida-SVN] r3485 - in branches/tcmalloc-1.4: Avida.xcodeproj source/platform/tcmalloc-1.4
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Wed Oct 14 19:27:42 PDT 2009
Author: brysonda
Date: 2009-10-14 22:27:41 -0400 (Wed, 14 Oct 2009)
New Revision: 3485
Modified:
branches/tcmalloc-1.4/Avida.xcodeproj/project.pbxproj
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/central_freelist.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.h
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/malloc_extension.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/packed-cache-inl.h
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.h
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap_allocator.h
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/pagemap.h
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/static_vars.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/tcmalloc.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.cc
branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.h
Log:
Clean up sign comparison warnings in tcmalloc 1.4.
Modified: branches/tcmalloc-1.4/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/tcmalloc-1.4/Avida.xcodeproj/project.pbxproj 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/Avida.xcodeproj/project.pbxproj 2009-10-15 02:27:41 UTC (rev 3485)
@@ -31,7 +31,6 @@
5629D8110C3EE14800C5F152 /* cTextWindow.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5629D80D0C3EE13500C5F152 /* cTextWindow.cc */; };
5629D8180C3EE20C00C5F152 /* libncurses.5.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 70658C59085DF67D00486BED /* libncurses.5.4.dylib */; };
5629D8190C3EE21300C5F152 /* libavida-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7023EC330C0A426900362B9C /* libavida-core.a */; };
- 5629D81A0C3EE21300C5F152 /* libtcmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70AA941909D486AE006A24C8 /* libtcmalloc.a */; };
5629D81C0C3EE26A00C5F152 /* cCoreView_Info.cc in Sources */ = {isa = PBXBuildFile; fileRef = 565121C60C3B055F009CBD3F /* cCoreView_Info.cc */; };
56F555E50C3B402A00E2E929 /* cDriver_TextViewer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 56F555DF0C3B402A00E2E929 /* cDriver_TextViewer.cc */; };
56F555E70C3B402A00E2E929 /* viewer-text.cc in Sources */ = {isa = PBXBuildFile; fileRef = 56F555E40C3B402A00E2E929 /* viewer-text.cc */; };
@@ -182,7 +181,6 @@
7023ECCD0C0A444600362B9C /* cZoomScreen.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC75097AF730002F8733 /* cZoomScreen.cc */; };
7023ECCE0C0A444800362B9C /* viewer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC78097AF730002F8733 /* viewer.cc */; };
7023ECD30C0A447700362B9C /* libavida-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7023EC330C0A426900362B9C /* libavida-core.a */; };
- 7023ECD40C0A447800362B9C /* libtcmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70AA941909D486AE006A24C8 /* libtcmalloc.a */; };
7023ECD70C0A44BF00362B9C /* main.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC57097AF730002F8733 /* main.cc */; };
7023ECD80C0A44C400362B9C /* cASLibrary.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70731663097C6DF500815164 /* cASLibrary.cc */; };
7023ECDA0C0A44C900362B9C /* cLexer.l in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAD21097AF81A002F8733 /* cLexer.l */; };
@@ -190,7 +188,6 @@
7023ECDC0C0A44CC00362B9C /* cScriptObject.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702F52DF0992FD8000B2B507 /* cScriptObject.cc */; };
7023ECDD0C0A44CE00362B9C /* cSymbolTable.cc in Sources */ = {isa = PBXBuildFile; fileRef = 702F52A80992F8F600B2B507 /* cSymbolTable.cc */; };
7023ECDE0C0A44D800362B9C /* libavida-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7023EC330C0A426900362B9C /* libavida-core.a */; };
- 7023ECDF0C0A44D900362B9C /* libtcmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70AA941909D486AE006A24C8 /* libtcmalloc.a */; };
702F532F0993060A00B2B507 /* avida-s in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70DCAD1C097AF7CC002F8733 /* avida-s */; };
70310E6B0EDD09260044971B /* cStateGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 70310E690EDD09260044971B /* cStateGrid.h */; };
70381F810EAD0BD000A97DFD /* ASAnalyzeLib.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70381F800EAD0BD000A97DFD /* ASAnalyzeLib.cc */; };
@@ -235,9 +232,6 @@
709A1EEC0EB6C42D006090AF /* cResourceHistory.cc in Sources */ = {isa = PBXBuildFile; fileRef = 709A1EEA0EB6C42D006090AF /* cResourceHistory.cc */; };
70A33CF60D8DCBB4008EF976 /* ASCoreLib.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70A33CF50D8DCBB4008EF976 /* ASCoreLib.cc */; };
70A778390D69D5CA00735F1E /* cDemeProbSchedule.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70A778370D69D5C200735F1E /* cDemeProbSchedule.cc */; };
- 70AA941A09D486CA006A24C8 /* system-alloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF50209CFB0B400924128 /* system-alloc.cc */; };
- 70AA941B09D486CB006A24C8 /* tcmalloc-logging.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF57F09CFBD3D00924128 /* tcmalloc-logging.cc */; };
- 70AA941C09D486CD006A24C8 /* tcmalloc.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCF56309CFBB9500924128 /* tcmalloc.cc */; };
70AD4FA00F194F4D00AA50AC /* cGenotypeData.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70AD4F9E0F194DD400AA50AC /* cGenotypeData.cc */; };
70B1A7430B7E3FFD00067486 /* instset-experimental.cfg in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70B1A7420B7E3FFD00067486 /* instset-experimental.cfg */; };
70B1A75A0B7E431F00067486 /* experimental.org in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70B1A7590B7E431F00067486 /* experimental.org */; };
@@ -245,6 +239,9 @@
70B651B70BEA9AEC002472ED /* unit-tests in CopyFiles */ = {isa = PBXBuildFile; fileRef = 70B6514C0BEA6FAD002472ED /* unit-tests */; };
70BB2A2B0E9FA12F008269D2 /* ASAvidaLib.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70BB2A2A0E9FA12F008269D2 /* ASAvidaLib.cc */; };
70BB2AE20EA5303F008269D2 /* cDriverStatusConduit.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70BB2AC60EA52BD9008269D2 /* cDriverStatusConduit.cc */; };
+ 70C9D5C71086890000472C46 /* libtcmalloc-1.4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7022469D107FC4F10079CD25 /* libtcmalloc-1.4.a */; };
+ 70C9D5CA1086893100472C46 /* libtcmalloc-1.4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7022469D107FC4F10079CD25 /* libtcmalloc-1.4.a */; };
+ 70C9D5CD1086894E00472C46 /* libtcmalloc-1.4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7022469D107FC4F10079CD25 /* libtcmalloc-1.4.a */; };
70DCAC9C097AF7C0002F8733 /* primitive.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70DCAC9B097AF7C0002F8733 /* primitive.cc */; };
70E60C4B0EC0088300718740 /* cGenotypeBatch.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70E60C4A0EC0088300718740 /* cGenotypeBatch.cc */; };
70EFD6600D975B6E00FAD32A /* cConstBurstSchedule.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70EFD65F0D975B5E00FAD32A /* cConstBurstSchedule.cc */; };
@@ -276,13 +273,6 @@
remoteGlobalIDString = 7023EC320C0A426900362B9C;
remoteInfo = "avida-core";
};
- 56F555DC0C3B370100E2E929 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 70AA941809D486AE006A24C8;
- remoteInfo = tcmalloc;
- };
702247EA108624880079CD25 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
@@ -304,20 +294,6 @@
remoteGlobalIDString = 7023EC320C0A426900362B9C;
remoteInfo = "avida-core";
};
- 7023ECD10C0A445B00362B9C /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 70AA941809D486AE006A24C8;
- remoteInfo = tcmalloc;
- };
- 7023ECE00C0A44DE00362B9C /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 70AA941809D486AE006A24C8;
- remoteInfo = tcmalloc;
- };
7023ECE20C0A44E000362B9C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
@@ -346,6 +322,27 @@
remoteGlobalIDString = 70B6514B0BEA6FAD002472ED;
remoteInfo = "unit-tests";
};
+ 70C9D5C5108688FA00472C46 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ remoteInfo = "tcmalloc-1.4";
+ };
+ 70C9D5C81086891B00472C46 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ remoteInfo = "tcmalloc-1.4";
+ };
+ 70C9D5CB1086894A00472C46 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = DCC30C4D0762532C008F7A48 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ remoteInfo = "tcmalloc-1.4";
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -731,7 +728,6 @@
70A33CF50D8DCBB4008EF976 /* ASCoreLib.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASCoreLib.cc; sourceTree = "<group>"; };
70A778370D69D5C200735F1E /* cDemeProbSchedule.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cDemeProbSchedule.cc; sourceTree = "<group>"; };
70A778380D69D5C200735F1E /* cDemeProbSchedule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cDemeProbSchedule.h; sourceTree = "<group>"; };
- 70AA941909D486AE006A24C8 /* libtcmalloc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtcmalloc.a; sourceTree = BUILT_PRODUCTS_DIR; };
70AD4F990F194D2400AA50AC /* cGenotypeData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cGenotypeData.h; sourceTree = "<group>"; };
70AD4F9E0F194DD400AA50AC /* cGenotypeData.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cGenotypeData.cc; sourceTree = "<group>"; };
70AE2D360E7DCAA100A520B5 /* cASNativeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cASNativeObject.h; sourceTree = "<group>"; };
@@ -962,15 +958,6 @@
70DCAD1F097AF81A002F8733 /* AvidaScript.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AvidaScript.h; sourceTree = "<group>"; };
70DCAD20097AF81A002F8733 /* cLexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cLexer.h; sourceTree = "<group>"; };
70DCAD21097AF81A002F8733 /* cLexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = cLexer.l; sourceTree = "<group>"; };
- 70DCF50109CFB0B400924128 /* system-alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "system-alloc.h"; sourceTree = "<group>"; };
- 70DCF50209CFB0B400924128 /* system-alloc.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "system-alloc.cc"; sourceTree = "<group>"; };
- 70DCF52809CFB93200924128 /* spinlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spinlock.h; sourceTree = "<group>"; };
- 70DCF52E09CFB95600924128 /* pagemap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pagemap.h; sourceTree = "<group>"; };
- 70DCF56309CFBB9500924128 /* tcmalloc.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tcmalloc.cc; sourceTree = "<group>"; };
- 70DCF56C09CFBC3F00924128 /* tcmalloc-config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "tcmalloc-config.h"; sourceTree = "<group>"; };
- 70DCF57409CFBCA500924128 /* tcmalloc-platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "tcmalloc-platform.h"; sourceTree = "<group>"; };
- 70DCF57F09CFBD3D00924128 /* tcmalloc-logging.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = "tcmalloc-logging.cc"; sourceTree = "<group>"; };
- 70DCF58009CFBD3D00924128 /* tcmalloc-logging.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "tcmalloc-logging.h"; sourceTree = "<group>"; };
70E130BF0C442B2900CE9249 /* cCoords.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cCoords.h; sourceTree = "<group>"; };
70E130E30C4551E900CE9249 /* cASTVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cASTVisitor.h; sourceTree = "<group>"; };
70E60C4A0EC0088300718740 /* cGenotypeBatch.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cGenotypeBatch.cc; sourceTree = "<group>"; };
@@ -1027,7 +1014,7 @@
files = (
5629D8180C3EE20C00C5F152 /* libncurses.5.4.dylib in Frameworks */,
5629D8190C3EE21300C5F152 /* libavida-core.a in Frameworks */,
- 5629D81A0C3EE21300C5F152 /* libtcmalloc.a in Frameworks */,
+ 70C9D5CD1086894E00472C46 /* libtcmalloc-1.4.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1037,7 +1024,7 @@
files = (
70658C5A085DF67D00486BED /* libncurses.5.4.dylib in Frameworks */,
7023ECD30C0A447700362B9C /* libavida-core.a in Frameworks */,
- 7023ECD40C0A447800362B9C /* libtcmalloc.a in Frameworks */,
+ 70C9D5CA1086893100472C46 /* libtcmalloc-1.4.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1055,13 +1042,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 70AA941709D486AE006A24C8 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
70B6514A0BEA6FAD002472ED /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -1074,7 +1054,7 @@
buildActionMask = 2147483647;
files = (
7023ECDE0C0A44D800362B9C /* libavida-core.a in Frameworks */,
- 7023ECDF0C0A44D900362B9C /* libtcmalloc.a in Frameworks */,
+ 70C9D5C71086890000472C46 /* libtcmalloc-1.4.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1486,7 +1466,6 @@
isa = PBXGroup;
children = (
70224698107FC4BB0079CD25 /* tcmalloc-1.4 */,
- 70DCF50009CF823500924128 /* tcmalloc */,
70436B200C36C64000A05ABA /* cConditionVariable.h */,
70436B210C36C64000A05ABA /* cMutex.h */,
70436B220C36C64000A05ABA /* cRWLock.h */,
@@ -1502,22 +1481,6 @@
path = platform;
sourceTree = "<group>";
};
- 70DCF50009CF823500924128 /* tcmalloc */ = {
- isa = PBXGroup;
- children = (
- 70DCF57F09CFBD3D00924128 /* tcmalloc-logging.cc */,
- 70DCF58009CFBD3D00924128 /* tcmalloc-logging.h */,
- 70DCF50109CFB0B400924128 /* system-alloc.h */,
- 70DCF50209CFB0B400924128 /* system-alloc.cc */,
- 70DCF52809CFB93200924128 /* spinlock.h */,
- 70DCF52E09CFB95600924128 /* pagemap.h */,
- 70DCF56309CFBB9500924128 /* tcmalloc.cc */,
- 70DCF56C09CFBC3F00924128 /* tcmalloc-config.h */,
- 70DCF57409CFBCA500924128 /* tcmalloc-platform.h */,
- );
- path = tcmalloc;
- sourceTree = "<group>";
- };
70F7D8C8092546DC009E311D /* classification */ = {
isa = PBXGroup;
children = (
@@ -1925,7 +1888,6 @@
DCC3164D07626CF3008F7A48 /* avida */,
700E2B83085DE50C00CF158A /* avida-viewer */,
70DCAD1C097AF7CC002F8733 /* avida-s */,
- 70AA941909D486AE006A24C8 /* libtcmalloc.a */,
70B6514C0BEA6FAD002472ED /* unit-tests */,
7023EC330C0A426900362B9C /* libavida-core.a */,
56F555D00C3B364E00E2E929 /* avida-text */,
@@ -1964,13 +1926,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 70AA941509D486AE006A24C8 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
@@ -1985,7 +1940,7 @@
);
dependencies = (
56F555DB0C3B36FC00E2E929 /* PBXTargetDependency */,
- 56F555DD0C3B370100E2E929 /* PBXTargetDependency */,
+ 70C9D5CC1086894A00472C46 /* PBXTargetDependency */,
);
name = "avida-text";
productName = "New Text Viewer";
@@ -2003,8 +1958,8 @@
buildRules = (
);
dependencies = (
+ 70C9D5C91086891B00472C46 /* PBXTargetDependency */,
7023ECD00C0A445800362B9C /* PBXTargetDependency */,
- 7023ECD20C0A445B00362B9C /* PBXTargetDependency */,
);
name = "avida-viewer";
productName = primitive;
@@ -2046,23 +2001,6 @@
productReference = 7023EC330C0A426900362B9C /* libavida-core.a */;
productType = "com.apple.product-type.library.static";
};
- 70AA941809D486AE006A24C8 /* tcmalloc */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 70AA942509D48715006A24C8 /* Build configuration list for PBXNativeTarget "tcmalloc" */;
- buildPhases = (
- 70AA941509D486AE006A24C8 /* Headers */,
- 70AA941609D486AE006A24C8 /* Sources */,
- 70AA941709D486AE006A24C8 /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = tcmalloc;
- productName = tcmalloc;
- productReference = 70AA941909D486AE006A24C8 /* libtcmalloc.a */;
- productType = "com.apple.product-type.library.static";
- };
70B6514B0BEA6FAD002472ED /* unit-tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 70B651570BEA700B002472ED /* Build configuration list for PBXNativeTarget "unit-tests" */;
@@ -2094,7 +2032,7 @@
);
dependencies = (
7023ECE30C0A44E000362B9C /* PBXTargetDependency */,
- 7023ECE10C0A44DE00362B9C /* PBXTargetDependency */,
+ 70C9D5C6108688FA00472C46 /* PBXTargetDependency */,
);
name = "avida-s";
productName = primitive;
@@ -2139,7 +2077,6 @@
700E2AF3085DE50C00CF158A /* avida-viewer */,
56F555CF0C3B364E00E2E929 /* avida-text */,
7023EC320C0A426900362B9C /* avida-core */,
- 70AA941809D486AE006A24C8 /* tcmalloc */,
7022469C107FC4F10079CD25 /* tcmalloc-1.4 */,
70B6514B0BEA6FAD002472ED /* unit-tests */,
);
@@ -2371,16 +2308,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 70AA941609D486AE006A24C8 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 70AA941A09D486CA006A24C8 /* system-alloc.cc in Sources */,
- 70AA941B09D486CB006A24C8 /* tcmalloc-logging.cc in Sources */,
- 70AA941C09D486CD006A24C8 /* tcmalloc.cc in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
70B651490BEA6FAD002472ED /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -2427,11 +2354,6 @@
target = 7023EC320C0A426900362B9C /* avida-core */;
targetProxy = 56F555DA0C3B36FC00E2E929 /* PBXContainerItemProxy */;
};
- 56F555DD0C3B370100E2E929 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 70AA941809D486AE006A24C8 /* tcmalloc */;
- targetProxy = 56F555DC0C3B370100E2E929 /* PBXContainerItemProxy */;
- };
702247EB108624880079CD25 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
@@ -2447,16 +2369,6 @@
target = 7023EC320C0A426900362B9C /* avida-core */;
targetProxy = 7023ECCF0C0A445800362B9C /* PBXContainerItemProxy */;
};
- 7023ECD20C0A445B00362B9C /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 70AA941809D486AE006A24C8 /* tcmalloc */;
- targetProxy = 7023ECD10C0A445B00362B9C /* PBXContainerItemProxy */;
- };
- 7023ECE10C0A44DE00362B9C /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 70AA941809D486AE006A24C8 /* tcmalloc */;
- targetProxy = 7023ECE00C0A44DE00362B9C /* PBXContainerItemProxy */;
- };
7023ECE30C0A44E000362B9C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 7023EC320C0A426900362B9C /* avida-core */;
@@ -2477,6 +2389,21 @@
target = 70B6514B0BEA6FAD002472ED /* unit-tests */;
targetProxy = 7023ED570C0A591100362B9C /* PBXContainerItemProxy */;
};
+ 70C9D5C6108688FA00472C46 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ targetProxy = 70C9D5C5108688FA00472C46 /* PBXContainerItemProxy */;
+ };
+ 70C9D5C91086891B00472C46 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ targetProxy = 70C9D5C81086891B00472C46 /* PBXContainerItemProxy */;
+ };
+ 70C9D5CC1086894A00472C46 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7022469C107FC4F10079CD25 /* tcmalloc-1.4 */;
+ targetProxy = 70C9D5CB1086894A00472C46 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
@@ -2726,42 +2653,6 @@
};
name = Deployment;
};
- 70AA942609D48715006A24C8 /* Development */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEPLOYMENT_POSTPROCESSING = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- PRODUCT_NAME = tcmalloc;
- };
- name = Development;
- };
- 70AA942709D48715006A24C8 /* Deployment */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEPLOYMENT_POSTPROCESSING = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- PRODUCT_NAME = tcmalloc;
- };
- name = Deployment;
- };
- 70AA942809D48715006A24C8 /* Deployment-G5 */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEPLOYMENT_POSTPROCESSING = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- PRODUCT_NAME = tcmalloc;
- };
- name = "Deployment-G5";
- };
- 70AA942909D48715006A24C8 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEPLOYMENT_POSTPROCESSING = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- PRODUCT_NAME = tcmalloc;
- };
- name = Profile;
- };
70B393DC0944CA6F0018F09D /* Deployment-G5 */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -2946,15 +2837,6 @@
};
name = Profile;
};
- E62620990A372B9900C07685 /* Deployment-Universal */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DEPLOYMENT_POSTPROCESSING = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- PRODUCT_NAME = tcmalloc;
- };
- name = "Deployment-Universal";
- };
E626209A0A372B9900C07685 /* Deployment-Universal */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -3103,18 +2985,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Deployment;
};
- 70AA942509D48715006A24C8 /* Build configuration list for PBXNativeTarget "tcmalloc" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 70AA942609D48715006A24C8 /* Development */,
- 70AA942709D48715006A24C8 /* Deployment */,
- 70AA942809D48715006A24C8 /* Deployment-G5 */,
- E62620990A372B9900C07685 /* Deployment-Universal */,
- 70AA942909D48715006A24C8 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Deployment;
- };
70B651570BEA700B002472ED /* Build configuration list for PBXNativeTarget "unit-tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/central_freelist.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/central_freelist.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/central_freelist.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -128,18 +128,17 @@
}
}
-bool CentralFreeList::EvictRandomSizeClass(
- int locked_size_class, bool force) {
+bool CentralFreeList::EvictRandomSizeClass(int locked_size_class, bool force) {
static int race_counter = 0;
int t = race_counter++; // Updated without a lock, but who cares.
- if (t >= kNumClasses) {
- while (t >= kNumClasses) {
+ if (t >= static_cast<int>(kNumClasses)) {
+ while (t >= static_cast<int>(kNumClasses)) {
t -= kNumClasses;
}
race_counter = t;
}
ASSERT(t >= 0);
- ASSERT(t < kNumClasses);
+ ASSERT(t < static_cast<int>(kNumClasses));
if (t == locked_size_class) return false;
return Static::central_cache()[t].ShrinkCache(locked_size_class, force);
}
@@ -302,7 +301,7 @@
// Cache sizeclass info eagerly. Locking is not necessary.
// (Instead of being eager, we could just replace any stale info
// about this span, but that seems to be no better in practice.)
- for (int i = 0; i < npages; i++) {
+ for (unsigned int i = 0; i < npages; i++) {
Static::pageheap()->CacheSizeClass(span->start + i, size_class_);
}
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -104,12 +104,12 @@
if (ClassIndex(0) < 0) {
CRASH("Invalid class index %d for size 0\n", ClassIndex(0));
}
- if (ClassIndex(kMaxSize) >= sizeof(class_array_)) {
+ if (static_cast<unsigned int>(ClassIndex(kMaxSize)) >= sizeof(class_array_)) {
CRASH("Invalid class index %d for kMaxSize\n", ClassIndex(kMaxSize));
}
// Compute the size classes we want to use
- int sc = 1; // Next size class to assign
+ unsigned int sc = 1; // Next size class to assign
int alignment = kAlignment;
CHECK_CONDITION(kAlignment <= 16);
int last_lg = -1;
@@ -167,7 +167,7 @@
// Initialize the mapping arrays
int next_size = 0;
- for (int c = 1; c < kNumClasses; c++) {
+ for (unsigned int c = 1; c < kNumClasses; c++) {
const int max_size_in_class = class_to_size_[c];
for (int s = next_size; s <= max_size_in_class; s += kAlignment) {
class_array_[ClassIndex(s)] = c;
@@ -177,7 +177,7 @@
// Double-check sizes just to be safe
for (size_t size = 0; size <= kMaxSize; size++) {
- const int sc = SizeClass(size);
+ const unsigned int sc = SizeClass(size);
if (sc <= 0 || sc >= kNumClasses) {
CRASH("Bad size class %d for %" PRIuS "\n", sc, size);
}
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/common.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -142,8 +142,7 @@
// Compute index of the class_array[] entry for a given size
static inline int ClassIndex(int s) {
- ASSERT(0 <= s);
- ASSERT(s <= kMaxSize);
+ ASSERT(s <= static_cast<int>(kMaxSize));
const bool big = (s > kMaxSmallSize);
const int add_amount = big ? (127 + (120<<7)) : 7;
const int shift_amount = big ? 7 : 3;
@@ -166,7 +165,7 @@
// Initialize the mapping arrays
void Init();
- inline int SizeClass(int size) {
+ inline unsigned int SizeClass(int size) {
return class_array_[ClassIndex(size)];
}
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/malloc_extension.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/malloc_extension.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/malloc_extension.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -72,23 +72,6 @@
using std::string;
-static void DumpAddressMap(string* result) {
- *result += "\nMAPPED_LIBRARIES:\n";
- // We keep doubling until we get a fit
- const size_t old_resultlen = result->size();
- for (int amap_size = 10240; amap_size < 10000000; amap_size *= 2) {
- result->resize(old_resultlen + amap_size);
- const int bytes_written =
- tcmalloc::FillProcSelfMaps(&((*result)[old_resultlen]), amap_size);
- if (bytes_written < amap_size - 1) { // we fit!
- (*result)[old_resultlen + bytes_written] = '\0';
- result->resize(old_resultlen + bytes_written);
- return;
- }
- }
- result->reserve(old_resultlen); // just don't print anything
-}
-
// Note: this routine is meant to be called before threads are spawned.
void MallocExtension::Initialize() {
static bool initialize_called = false;
@@ -267,7 +250,7 @@
void PrintStackEntry(MallocExtensionWriter* writer, void** entry) {
PrintCountAndSize(writer, Count(entry), Size(entry));
- for (int i = 0; i < Depth(entry); i++) {
+ for (unsigned int i = 0; i < Depth(entry); i++) {
char buf[32];
snprintf(buf, sizeof(buf), " %p", PC(entry, i));
writer->append(buf, strlen(buf));
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/packed-cache-inl.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/packed-cache-inl.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/packed-cache-inl.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -159,8 +159,8 @@
static const bool kUseWholeKeys = kKeybits + kValuebits <= 8 * sizeof(T);
explicit PackedCache(V initial_value) {
- COMPILE_ASSERT(kKeybits <= sizeof(K) * 8, key_size);
- COMPILE_ASSERT(kValuebits <= sizeof(V) * 8, value_size);
+ COMPILE_ASSERT(static_cast<int>(kKeybits) <= sizeof(K) * 8, key_size);
+ COMPILE_ASSERT(static_cast<int>(kValuebits) <= sizeof(V) * 8, value_size);
COMPILE_ASSERT(kHashbits <= kKeybits, hash_function);
COMPILE_ASSERT(kKeybits - kHashbits + kValuebits <= kTbits,
entry_size_must_be_big_enough);
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -81,7 +81,7 @@
COMPILE_ASSERT(kNumClasses <= (1 << PageMapCache::kValuebits), valuebits);
DLL_Init(&large_.normal);
DLL_Init(&large_.returned);
- for (int i = 0; i < kMaxPages; i++) {
+ for (unsigned int i = 0; i < kMaxPages; i++) {
DLL_Init(&free_[i].normal);
DLL_Init(&free_[i].returned);
}
@@ -191,7 +191,7 @@
RecordSpan(leftover);
// Place leftover span on appropriate free list
- SpanList* listpair = (extra < kMaxPages) ? &free_[extra] : &large_;
+ SpanList* listpair = (extra < static_cast<int>(kMaxPages)) ? &free_[extra] : &large_;
Span* dst = (leftover->location == Span::ON_RETURNED_FREELIST
? &listpair->returned : &listpair->normal);
DLL_Prepend(dst, leftover);
@@ -281,8 +281,8 @@
}
// Find index of free list to scavenge
- int index = scavenge_index_ + 1;
- for (int i = 0; i < kMaxPages+1; i++) {
+ unsigned int index = scavenge_index_ + 1;
+ for (unsigned int i = 0; i < kMaxPages+1; i++) {
if (index > kMaxPages) index = 0;
SpanList* slist = (index == kMaxPages) ? &large_ : &free_[index];
if (!DLL_IsEmpty(&slist->normal)) {
@@ -334,7 +334,7 @@
void PageHeap::Dump(TCMalloc_Printer* out) {
int nonempty_sizes = 0;
- for (int s = 0; s < kMaxPages; s++) {
+ for (unsigned int s = 0; s < kMaxPages; s++) {
if (!DLL_IsEmpty(&free_[s].normal) || !DLL_IsEmpty(&free_[s].returned)) {
nonempty_sizes++;
}
@@ -345,7 +345,7 @@
out->printf("------------------------------------------------\n");
uint64_t total_normal = 0;
uint64_t total_returned = 0;
- for (int s = 0; s < kMaxPages; s++) {
+ for (unsigned int s = 0; s < kMaxPages; s++) {
const int n_length = DLL_Length(&free_[s].normal);
const int r_length = DLL_Length(&free_[s].returned);
if (n_length + r_length > 0) {
@@ -396,7 +396,7 @@
bool PageHeap::GrowHeap(Length n) {
ASSERT(kMaxPages >= kMinSystemAlloc);
if (n > kMaxValidPages) return false;
- Length ask = (n>kMinSystemAlloc) ? n : static_cast<Length>(kMinSystemAlloc);
+ Length ask = (n > kMinSystemAlloc) ? n : static_cast<Length>(kMinSystemAlloc);
size_t actual_size;
void* ptr = TCMalloc_SystemAlloc(ask << kPageShift, &actual_size, kPageSize);
if (ptr == NULL) {
@@ -461,7 +461,7 @@
}
bool PageHeap::CheckList(Span* list, Length min_pages, Length max_pages,
- int freelist) {
+ unsigned int freelist) {
for (Span* s = list->next; s != list; s = s->next) {
CHECK_CONDITION(s->location == freelist); // NORMAL or RETURNED
CHECK_CONDITION(s->length >= min_pages);
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -147,7 +147,7 @@
// Like Check() but does some more comprehensive checking.
bool CheckExpensive();
bool CheckList(Span* list, Length min_pages, Length max_pages,
- int freelist); // ON_NORMAL_FREELIST or ON_RETURNED_FREELIST
+ unsigned int freelist); // ON_NORMAL_FREELIST or ON_RETURNED_FREELIST
// Release all pages on the free list for reuse by the OS:
void ReleaseFreePages();
@@ -173,7 +173,7 @@
// should keep this value big because various incarnations of Linux
// have small limits on the number of mmap() regions per
// address-space.
- static const int kMinSystemAlloc = 1 << (20 - kPageShift);
+ static const unsigned int kMinSystemAlloc = 1 << (20 - kPageShift);
// For all span-lengths < kMaxPages we keep an exact-size list.
// REQUIRED: kMaxPages >= kMinSystemAlloc;
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap_allocator.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap_allocator.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/page_heap_allocator.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -112,7 +112,7 @@
private:
// How much to allocate from system at a time
- static const int kAllocIncrement = 128 << 10;
+ static const unsigned int kAllocIncrement = 128 << 10;
// Aligned size of T
static const size_t kAlignedSize
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/pagemap.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/pagemap.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/pagemap.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -131,7 +131,7 @@
private:
// Put 32 entries in the root and (2^BITS)/32 entries in each leaf.
static const int ROOT_BITS = 5;
- static const int ROOT_LENGTH = 1 << ROOT_BITS;
+ static const unsigned int ROOT_LENGTH = 1 << ROOT_BITS;
static const int LEAF_BITS = BITS - ROOT_BITS;
static const int LEAF_LENGTH = 1 << LEAF_BITS;
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/static_vars.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/static_vars.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/static_vars.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -71,7 +71,7 @@
span_allocator_.New(); // Reduce cache conflicts
// Do a bit of sanitizing: make sure central_cache is aligned properly
CHECK_CONDITION((sizeof(central_cache_[0]) % 64) == 0);
- for (int i = 0; i < kNumClasses; ++i) {
+ for (unsigned int i = 0; i < kNumClasses; ++i) {
central_cache_[i].Init(i);
}
new ((void*)pageheap_memory_) PageHeap;
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/tcmalloc.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/tcmalloc.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/tcmalloc.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -318,7 +318,7 @@
static void ExtractStats(TCMallocStats* r, uint64_t* class_count) {
r->central_bytes = 0;
r->transfer_bytes = 0;
- for (int cl = 0; cl < kNumClasses; ++cl) {
+ for (unsigned int cl = 0; cl < kNumClasses; ++cl) {
const int length = Static::central_cache()[cl].length();
const int tc_length = Static::central_cache()[cl].tc_length();
const size_t size = static_cast<uint64_t>(
@@ -356,7 +356,7 @@
out->printf("Size class breakdown\n");
out->printf("------------------------------------------------\n");
uint64_t cumulative = 0;
- for (int cl = 0; cl < kNumClasses; ++cl) {
+ for (unsigned int cl = 0; cl < kNumClasses; ++cl) {
if (class_count[cl] > 0) {
uint64_t class_bytes =
class_count[cl] * Static::sizemap()->ByteSizeForClass(cl);
@@ -717,8 +717,8 @@
// . If we need to grow, grow to max(new_size, old_size * 1.X)
// . Don't shrink unless new_size < old_size * 0.Y
// X and Y trade-off time for wasted space. For now we do 1.25 and 0.5.
- const int lower_bound_to_grow = old_size + old_size / 4;
- const int upper_bound_to_shrink = old_size / 2;
+ const unsigned int lower_bound_to_grow = old_size + old_size / 4;
+ const unsigned int upper_bound_to_shrink = old_size / 2;
if ((new_size > old_size) || (new_size < upper_bound_to_shrink)) {
// Need to reallocate.
void* new_ptr = NULL;
@@ -773,7 +773,7 @@
// are aligned at powers of two. We will waste time and space if
// we miss in the size class array, but that is deemed acceptable
// since memalign() should be used rarely.
- int cl = Static::sizemap()->SizeClass(size);
+ unsigned int cl = Static::sizemap()->SizeClass(size);
while (cl < kNumClasses &&
((Static::sizemap()->class_to_size(cl) & (align - 1)) != 0)) {
cl++;
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.cc
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.cc 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.cc 2009-10-15 02:27:41 UTC (rev 3485)
@@ -145,7 +145,7 @@
void ThreadCache::Cleanup() {
// Put unused memory back into central cache
- for (int cl = 0; cl < kNumClasses; ++cl) {
+ for (unsigned int cl = 0; cl < kNumClasses; ++cl) {
if (list_[cl].length() > 0) {
ReleaseToCentralCache(&list_[cl], cl, list_[cl].length());
}
@@ -173,7 +173,7 @@
// Increase max length slowly up to batch_size. After that,
// increase by batch_size in one shot so that the length is a
// multiple of batch_size.
- if (list->max_length() < batch_size) {
+ if (static_cast<int>(list->max_length()) < batch_size) {
list->set_max_length(list->max_length() + 1);
} else {
// Don't let the list get too long. In 32 bit builds, the length
@@ -200,15 +200,15 @@
// num_objects_to_move, so the code below tries to make max_length
// converge on num_objects_to_move.
- if (list->max_length() < batch_size) {
+ if (static_cast<int>(list->max_length()) < batch_size) {
// Slow start the max_length so we don't overreserve.
list->set_max_length(list->max_length() + 1);
- } else if (list->max_length() > batch_size) {
+ } else if (static_cast<int>(list->max_length()) > batch_size) {
// If we consistently go over max_length, shrink max_length. If we don't
// shrink it, some amount of memory will always stay in this freelist.
list->set_length_overages(list->length_overages() + 1);
if (list->length_overages() > kMaxOverages) {
- ASSERT(list->max_length() > batch_size);
+ ASSERT(static_cast<int>(list->max_length()) > batch_size);
list->set_max_length(list->max_length() - batch_size);
list->set_length_overages(0);
}
@@ -218,7 +218,8 @@
// Remove some objects of class "cl" from thread heap and add to central cache
void ThreadCache::ReleaseToCentralCache(FreeList* src, size_t cl, int N) {
ASSERT(src == &list_[cl]);
- if (N > src->length()) N = src->length();
+ ASSERT(N >= 0);
+ if (static_cast<unsigned int>(N) > src->length()) N = src->length();
size_t delta_bytes = N * Static::sizemap()->ByteSizeForClass(cl);
// We return prepackaged chains of the correct size to the central cache.
@@ -245,7 +246,7 @@
// may not release much memory, but if so we will call scavenge again
// pretty soon and the low-water marks will be high on that call.
//int64 start = CycleClock::Now();
- for (int cl = 0; cl < kNumClasses; cl++) {
+ for (unsigned int cl = 0; cl < kNumClasses; cl++) {
FreeList* list = &list_[cl];
const int lowmark = list->lowwatermark();
if (lowmark > 0) {
@@ -260,7 +261,7 @@
// mainly for threads that stay relatively idle for their entire
// lifetime.
const int batch_size = Static::sizemap()->num_objects_to_move(cl);
- if (list->max_length() > batch_size) {
+ if (static_cast<int>(list->max_length()) > batch_size) {
list->set_max_length(
max<int>(list->max_length() - batch_size, batch_size));
}
@@ -480,7 +481,7 @@
}
void ThreadCache::Print(TCMalloc_Printer* out) const {
- for (int cl = 0; cl < kNumClasses; ++cl) {
+ for (unsigned int cl = 0; cl < kNumClasses; ++cl) {
out->printf(" %5" PRIuS " : %4" PRIuS " len; %4d lo; %4"PRIuS
" max; %4"PRIuS" overages;\n",
Static::sizemap()->ByteSizeForClass(cl),
@@ -506,7 +507,7 @@
for (ThreadCache* h = thread_heaps_; h != NULL; h = h->next_) {
*total_bytes += h->Size();
if (class_count) {
- for (int cl = 0; cl < kNumClasses; ++cl) {
+ for (unsigned int cl = 0; cl < kNumClasses; ++cl) {
class_count[cl] += h->freelist_length(cl);
}
}
Modified: branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.h
===================================================================
--- branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.h 2009-10-14 22:25:29 UTC (rev 3484)
+++ branches/tcmalloc-1.4/source/platform/tcmalloc-1.4/thread_cache.h 2009-10-15 02:27:41 UTC (rev 3485)
@@ -238,7 +238,7 @@
// The number of times that a deallocation can cause a freelist to
// go over its max_length() before shrinking max_length().
- static const int kMaxOverages = 3;
+ static const unsigned int kMaxOverages = 3;
// Gets and returns an object from the central cache, and, if possible,
// also adds some objects of that size class to this thread cache.
More information about the Avida-cvs
mailing list