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

Unified Diff: third_party/tcmalloc/page_heap.h

Issue 251065: Tracks the amount of committed vs uncommitted memory in tcmalloc's page heap's freelists (Closed)
Patch Set: whitespace Created 11 years, 2 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 | « no previous file | 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
diff --git a/third_party/tcmalloc/page_heap.h b/third_party/tcmalloc/page_heap.h
index aec933d1d1d514e2ac256a3958509ee083ca6b7b..100cae4f71c4f2a81970fce4114319e4062a40ac 100644
--- a/third_party/tcmalloc/page_heap.h
+++ b/third_party/tcmalloc/page_heap.h
@@ -121,6 +121,8 @@ class PageHeap {
// Return number of bytes allocated from system
inline uint64_t SystemBytes() const { return system_bytes_; }
+ inline uint64_t CommittedBytes() const { return committed_bytes_; }
+
// Return number of free bytes in heap
uint64_t FreeBytes() const {
return (static_cast<uint64_t>(free_pages_) << kPageShift);
@@ -188,6 +190,9 @@ class PageHeap {
// Bytes allocated from system
uint64_t system_bytes_;
+ // Bytes committed, always <= system_bytes_.
+ uint64_t committed_bytes_;
+
bool GrowHeap(Length n);
// REQUIRES: span->length >= n
@@ -220,6 +225,10 @@ class PageHeap {
// IncrementalScavenge(n) is called whenever n pages are freed.
void IncrementalScavenge(Length n);
+ // Releases all memory held in the given list's 'normal' freelist and adds
+ // it to the 'released' freelist.
+ void ReleaseFreeList(Span* list, Span* returned);
+
// Number of pages to deallocate before doing more scavenging
int64_t scavenge_counter_;
« no previous file with comments | « no previous file | third_party/tcmalloc/page_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698