summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-02-02 18:35:30 -0200
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-08-07 15:16:22 -0300
commit966350a187e0e21dd433229b45937683902387a4 (patch)
tree37df00984d7828c7d33c011ad4dfddfcdb9480cc
parent8a9bd672af892be57347b678bccb481f026bc132 (diff)
downloadgperftools-966350a187e0e21dd433229b45937683902387a4.tar.gz
RSS usage tuning for 64K pages
This patch lowers TCMalloc RSS usage when TCMALLOC_LARGE_PAGES64K is defined by tuning page scavenge values.
-rw-r--r--src/page_heap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/page_heap.h b/src/page_heap.h
index 18abed1..f4c9752 100644
--- a/src/page_heap.h
+++ b/src/page_heap.h
@@ -214,11 +214,21 @@ class PERFTOOLS_DLL_DECL PageHeap {
// Never delay scavenging for more than the following number of
// deallocated pages. With 4K pages, this comes to 4GB of
// deallocation.
+#ifndef TCMALLOC_LARGE_PAGES64K
static const int kMaxReleaseDelay = 1 << 20;
+#else
+ // With 64K pages this come to 16M
+ static const int kMaxReleaseDelay = 1 << 8;
+#endif
// If there is nothing to release, wait for so many pages before
// scavenging again. With 4K pages, this comes to 1GB of memory.
+#ifndef TCMALLOC_LARGE_PAGES64K
static const int kDefaultReleaseDelay = 1 << 18;
+#else
+ // WIth 64K pages, this comes to 4MB
+ static const int kDefaultReleaseDelay = 1 << 6;
+#endif
// Pick the appropriate map and cache types based on pointer size
typedef MapSelector<kAddressBits>::Type PageMap;