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

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

Issue 9717007: Try fixing virtual memory regression from new tcmalloc: use old kPageShift and kMaxSize w/ totally … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using 61... the old value. 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 | « no previous file | third_party/tcmalloc/chromium/src/common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/common.h
diff --git a/third_party/tcmalloc/chromium/src/common.h b/third_party/tcmalloc/chromium/src/common.h
index 4f848fa2f01013cf53931cf42b354c460d6585d5..0b70b09ca5d57c14b7e257a52337a6e0a8d84ca1 100644
--- a/third_party/tcmalloc/chromium/src/common.h
+++ b/third_party/tcmalloc/chromium/src/common.h
@@ -79,14 +79,18 @@ static const size_t kSkippedClasses = (kAlignment < kMinClassSize ? 1 : 0);
static const size_t kPageShift = 15;
static const size_t kNumClasses = 78 - kSkippedClasses;
#else
-static const size_t kPageShift = 13;
-static const size_t kNumClasses = 86 - kSkippedClasses;
+// Original TCMalloc code used kPageShift == 13. In Chromium, we changed
+// this to 12 (as was done in prior versions of TCMalloc).
+static const size_t kPageShift = 12;
+static const size_t kNumClasses = 61 - kSkippedClasses;
#endif
static const size_t kMaxThreadCacheSize = 4 << 20;
static const size_t kPageSize = 1 << kPageShift;
-// TODO(dmikurube): We Chromium may want to tune this kMaxSize.
-static const size_t kMaxSize = 256 * 1024;
+// Original TCMalloc code used kMaxSize == 256 * 1024. In Chromium, we
+// changed this to 32K, and represent it in terms of page size (as was done
+// in prior versions of TCMalloc).
+static const size_t kMaxSize = 8u * kPageSize;
// For all span-lengths < kMaxPages we keep an exact-size list.
static const size_t kMaxPages = 1 << (20 - kPageShift);
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698