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

Unified Diff: components/tracing/common/process_metrics_memory_dump_provider.cc

Issue 2786733004: macOS: Fix a bug in logic to get all memory regions. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/common/process_metrics_memory_dump_provider.cc
diff --git a/components/tracing/common/process_metrics_memory_dump_provider.cc b/components/tracing/common/process_metrics_memory_dump_provider.cc
index c2961357f60eeaf42549955f4abd6ca9d022e6e5..296ad418294cbae97ac68b40ffaa01f28d5c7675 100644
--- a/components/tracing/common/process_metrics_memory_dump_provider.cc
+++ b/components/tracing/common/process_metrics_memory_dump_provider.cc
@@ -430,7 +430,8 @@ bool GetAllRegions(std::vector<VMRegion>* regions) {
vm_region_submap_info_64 info;
natural_t depth = 1;
mach_msg_type_number_t count = sizeof(info);
- for (mach_vm_address_t address = MACH_VM_MIN_ADDRESS;; address += size) {
+ mach_vm_address_t address = MACH_VM_MIN_ADDRESS;
+ while (true) {
memset(&info, 0, sizeof(info));
kern_return_t kr = mach_vm_region_recurse(
task, &address, &size, &depth,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698