Commit ed751be8 authored by Mao Huang's avatar Mao Huang Committed by Commit Bot

tcmalloc: change the default page size to 4k

Original CL:

- https://chromiumcodereview.appspot.com/9722025

  Fix virtual memory regression from new tcmalloc: use old kPageShift
  and kMaxSize w/ kNumClasses = 54. (retry of r127301)

  BUG=118329
  TEST=perf tests.
  TBR=jar@chromium.org
  Committed:
  https://src.chromium.org/viewvc/chrome?view=rev&revision=127381

BUG=724399,b:70905156

Change-Id: I491bb82db0e94a71dc7c7b2742f9c4ef47b2eca1
Reviewed-on: https://chromium-review.googlesource.com/1130783Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579907}
parent 4170f3f7
......@@ -77,7 +77,9 @@ static const size_t kPageShift = 15;
#elif defined(TCMALLOC_64K_PAGES)
static const size_t kPageShift = 16;
#else
static const size_t kPageShift = 13;
// 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;
#endif
static const size_t kClassSizesMax = 96;
......@@ -85,7 +87,9 @@ static const size_t kClassSizesMax = 96;
static const size_t kMaxThreadCacheSize = 4 << 20;
static const size_t kPageSize = 1 << kPageShift;
static const size_t kMaxSize = 256 * 1024;
// Original TCMalloc code used kMaxSize == 256 * 1024. In Chromium, we
// changed this to 32K.
static const size_t kMaxSize = 32u * 1024;
static const size_t kAlignment = 8;
// For all span-lengths <= kMaxPages we keep an exact-size list in PageHeap.
static const size_t kMaxPages = 1 << (20 - kPageShift);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment