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

Unified Diff: third_party/tcmalloc/chromium/src/heap-profile-table.h

Issue 8635003: Fix HEAP_PROFILE_MMAP in google-perftools. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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
Index: third_party/tcmalloc/chromium/src/heap-profile-table.h
diff --git a/third_party/tcmalloc/chromium/src/heap-profile-table.h b/third_party/tcmalloc/chromium/src/heap-profile-table.h
index c9bee151e96291fe5db447ac84bd8f874f5890d4..0e9ef8c308c1f759d180c950400fd11472206f3b 100644
--- a/third_party/tcmalloc/chromium/src/heap-profile-table.h
+++ b/third_party/tcmalloc/chromium/src/heap-profile-table.h
@@ -181,6 +181,9 @@ class HeapProfileTable {
// Caller must call ReleaseSnapshot() on result when no longer needed.
Snapshot* NonLiveSnapshot(Snapshot* base);
+ void MMapRecordBegin() { mmap_record_ = true; }
+ void MMapRecordEnd() { mmap_record_ = false; }
+
private:
// data types ----------------------------
@@ -325,6 +328,10 @@ class HeapProfileTable {
// Map of all currently allocated objects we know about.
AllocationMap* allocation_;
+ // Mmap allocations are saved in a separate map
+ // because mmap and tcmalloc allocations could have the same address
+ AllocationMap* allocation_mmap_;
+ bool mmap_record_;
DISALLOW_COPY_AND_ASSIGN(HeapProfileTable);
};

Powered by Google App Engine
This is Rietveld 408576698