summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/page_heap.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 00:25:41 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 00:25:41 +0000
commite94afbb913b95f512cb8745a2729c73f82b15ae7 (patch)
treea6743a8f89cb44c6a5873c87706e83203fc05303 /third_party/tcmalloc/page_heap.h
parente0bf7382ae532696f850d41a131509a9cae5f215 (diff)
downloadchromium_src-e94afbb913b95f512cb8745a2729c73f82b15ae7.zip
chromium_src-e94afbb913b95f512cb8745a2729c73f82b15ae7.tar.gz
chromium_src-e94afbb913b95f512cb8745a2729c73f82b15ae7.tar.bz2
Rollback Scavenge implemetation and rely on existing functionality to free
This is a landing of a patch provided by antonm. See: http://codereview.chromium.org/235022 Also included change to browser_about_handler.cc to fix build, and I set TCMALLOC_RELEASE_RATE to 1.0 on line 40 of page_heap.cc (I think this was an inadvertent rollback element). r=antonm Review URL: http://codereview.chromium.org/257009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/tcmalloc/page_heap.h')
-rw-r--r--third_party/tcmalloc/page_heap.h32
1 files changed, 1 insertions, 31 deletions
diff --git a/third_party/tcmalloc/page_heap.h b/third_party/tcmalloc/page_heap.h
index 242623b..8d9822c 100644
--- a/third_party/tcmalloc/page_heap.h
+++ b/third_party/tcmalloc/page_heap.h
@@ -48,7 +48,6 @@
# include <google/stacktrace.h>
#endif
-
namespace tcmalloc {
// -------------------------------------------------------------------------
@@ -146,9 +145,6 @@ class PageHeap {
}
void CacheSizeClass(PageID p, size_t cl) const { pagemap_cache_.Put(p, cl); }
- // Attempt to free some free pages currently not used.
- void Scavenge();
-
private:
// Allocates a big block of memory for the pagemap once we reach more than
// 128MB
@@ -214,41 +210,15 @@ class PageHeap {
// span of exactly the specified length. Else, returns NULL.
Span* AllocLarge(Length n);
- // Commits the span.
+ // Commit the span.
void CommitSpan(Span* span);
-#if DEFER_DECOMMIT
- // Number of free committed pages that we want to keep around.
- static const size_t kMinimumFreeCommittedPageCount = 512; // 2M (2 ** 21) for 4K pages
-
- // During a scavenge, we'll release up to a fraction of the free committed pages.
-#ifdef _WIN32
- // We are slightly less aggressive in releasing memory on Windows due to performance reasons.
- static const int kMaxScavengeAmountFactor = 3;
-#else
- static const int kMaxScavengeAmountFactor = 2;
-#endif
-
- // Decommits some parts from SpanList.
- uint64_t DecommitFromSpanList(SpanList* span_list, uint64_t to_decommit);
-
- // Decommits some parts from SpanList.
- Length DecommitLastSpan(SpanList* span_list, Span* span);
-
- // Number of pages kept in free lists that are still committed a.k.a. total
- // number of pages in "normal" lists.
- uint64_t free_committed_pages_;
-
- // Number of pages that we commited in the last scavenge wait interval.
- uint64_t pages_committed_since_last_scavenge_;
-#else
// Incrementally release some memory to the system.
// IncrementalScavenge(n) is called whenever n pages are freed.
void IncrementalScavenge(Length n);
// Number of pages to deallocate before doing more scavenging
int64_t scavenge_counter_;
-#endif
// Index of last free list we scavenged
int scavenge_index_;