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

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

Issue 9699084: Try fixing virtual memory regression by new tcmalloc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: modified. 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
diff --git a/third_party/tcmalloc/chromium/src/common.h b/third_party/tcmalloc/chromium/src/common.h
index 4f848fa2f01013cf53931cf42b354c460d6585d5..2d242185408f33549cbaeb00285b49e1cd0285fb 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 = 54 - kSkippedClasses;
Dai Mikurube (NOT FULLTIME) 2012/03/15 20:18:18 We need a comment for this, too, if it works.
jar (doing other things) 2012/03/15 20:56:37 Again.... I'm surprised we're not over 60. What e
Dai Mikurube (NOT FULLTIME) 2012/03/15 21:00:13 At first, I tried picking the number from its erro
#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