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

Unified Diff: third_party/tcmalloc/chromium/src/deep-heap-profile.cc

Issue 14769008: Fix mmap region iteration while no regions are recorded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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/chromium/src/memory_region_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/deep-heap-profile.cc
diff --git a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
index 566dde1c0503772a505da5b1f9d169bc11abbd26..7201c8f2245d54b50efec136f36815f533140035 100644
--- a/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
+++ b/third_party/tcmalloc/chromium/src/deep-heap-profile.cc
@@ -646,8 +646,11 @@ void DeepHeapProfile::GlobalStats::SnapshotMaps(
MemoryRegionMap::RegionIterator mmap_iter =
MemoryRegionMap::BeginRegionLocked();
- DeepBucket* deep_bucket = GetInformationOfMemoryRegion(
- mmap_iter, memory_residence_info_getter, deep_profile);
+ DeepBucket* deep_bucket = NULL;
+ if (mmap_iter != MemoryRegionMap::EndRegionLocked()) {
+ deep_bucket = GetInformationOfMemoryRegion(
+ mmap_iter, memory_residence_info_getter, deep_profile);
+ }
while (procmaps_iter.Next(&vma_start_addr, &vma_last_addr,
&flags, &offset, &inode, &filename)) {
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/memory_region_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698