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

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

Issue 9722025: Fix virtual memory regression from new tcmalloc: use old kPageShift and kMaxSize w/ kNumClasses = 5… (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 | « no previous file | 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.h
===================================================================
--- third_party/tcmalloc/chromium/src/common.h (revision 127380)
+++ third_party/tcmalloc/chromium/src/common.h (working copy)
@@ -79,14 +79,18 @@
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 = 54 - 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698