diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-06-03 12:57:54 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-06-03 12:57:54 +1000 |
commit | 87010b47738fe11e1395f913bfffa9e787014c96 (patch) | |
tree | effcaee22c6c26fa9b8e1be0b1ce525a46e849c8 | |
parent | b730f98c9e6c26fe564c6a25612634058ae2dd22 (diff) | |
download | mongo-87010b47738fe11e1395f913bfffa9e787014c96.tar.gz |
SERVER-24076 Reduce tcmalloc overhead with >4KB pages.
-rw-r--r-- | src/third_party/gperftools-2.5/src/common.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/third_party/gperftools-2.5/src/common.h b/src/third_party/gperftools-2.5/src/common.h index 253f23b1da8..2be6bd66866 100644 --- a/src/third_party/gperftools-2.5/src/common.h +++ b/src/third_party/gperftools-2.5/src/common.h @@ -85,10 +85,10 @@ static const size_t kBaseClasses = 9; // These two factors cause a bounded increase in memory use. #if defined(TCMALLOC_32K_PAGES) static const size_t kPageShift = 15; -static const size_t kNumClasses = kBaseClasses + 69; +static const size_t kNumClasses = kBaseClasses + 38; #elif defined(TCMALLOC_64K_PAGES) static const size_t kPageShift = 16; -static const size_t kNumClasses = kBaseClasses + 32; +static const size_t kNumClasses = kBaseClasses + 42; #else static const size_t kPageShift = 12; static const size_t kNumClasses = kBaseClasses + 33; @@ -97,7 +97,13 @@ static const size_t kNumClasses = kBaseClasses + 33; static const size_t kMaxThreadCacheSize = 4 << 20; static const size_t kPageSize = 1 << kPageShift; +#if defined(TCMALLOC_32K_PAGES) +static const size_t kMaxSize = 32 * 1024; +#elif defined(TCMALLOC_64K_PAGES) +static const size_t kMaxSize = 64 * 1024; +#else static const size_t kMaxSize = 16 * 1024; +#endif static const size_t kAlignment = 8; static const size_t kLargeSizeClass = 0; // For all span-lengths < kMaxPages we keep an exact-size list. |