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)) { |