Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/tcmalloc/chromium/src/common.cc

Issue 9717009: Try fixing virtual memory regression from new tcmalloc: use old kPageShift and kMaxSize w/ kNumClas… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tcmalloc/chromium/src/common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/common.cc
diff --git a/third_party/tcmalloc/chromium/src/common.cc b/third_party/tcmalloc/chromium/src/common.cc
index dd175f223692a5adb37048140b30422bae79fe40..32debd9a984109063285f49122be67b3e2975985 100644
--- a/third_party/tcmalloc/chromium/src/common.cc
+++ b/third_party/tcmalloc/chromium/src/common.cc
@@ -58,9 +58,9 @@ static inline int LgFloor(size_t n) {
int AlignmentForSize(size_t size) {
int alignment = kAlignment;
- if (size > kMaxSize) {
- // Cap alignment at kPageSize for large sizes.
- alignment = kPageSize;
+ if (size > 2048) {
+ // Cap alignment at 256 for large sizes.
+ alignment = 256;
} else if (size >= 128) {
// Space wasted due to alignment is at most 1/8, i.e., 12.5%.
alignment = (1 << LgFloor(size)) / 8;
@@ -69,10 +69,6 @@ int AlignmentForSize(size_t size) {
// requirements for some SSE types.
alignment = 16;
}
- // Maximum alignment allowed is page size alignment.
- if (alignment > kPageSize) {
- alignment = kPageSize;
- }
CHECK_CONDITION(size < 16 || alignment >= 16);
CHECK_CONDITION((alignment & (alignment - 1)) == 0);
return alignment;
« no previous file with comments | « third_party/tcmalloc/chromium/src/common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698