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

Unified Diff: third_party/tcmalloc/page_heap.h

Issue 257009: Rollback Scavenge implemetation and rely on existing functionality to free... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « third_party/tcmalloc/malloc_extension.cc ('k') | third_party/tcmalloc/page_heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/page_heap.h
===================================================================
--- third_party/tcmalloc/page_heap.h (revision 27611)
+++ third_party/tcmalloc/page_heap.h (working copy)
@@ -48,7 +48,6 @@
# include <google/stacktrace.h>
#endif
-
namespace tcmalloc {
// -------------------------------------------------------------------------
@@ -146,9 +145,6 @@
}
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 @@
// 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_;
« no previous file with comments | « third_party/tcmalloc/malloc_extension.cc ('k') | third_party/tcmalloc/page_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698