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

Unified Diff: base/trace_event/process_memory_dump.cc

Issue 1441543002: Make vector_as_array use std::vector::data and switch a few directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark comment Created 5 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
« no previous file with comments | « base/stl_util.h ('k') | base/win/registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/process_memory_dump.cc
diff --git a/base/trace_event/process_memory_dump.cc b/base/trace_event/process_memory_dump.cc
index ea9ff14002b675bf487009a03dd3f0890a373bfa..15106729096befb9d89d286c7e47f70228684374 100644
--- a/base/trace_event/process_memory_dump.cc
+++ b/base/trace_event/process_memory_dump.cc
@@ -8,7 +8,6 @@
#include <vector>
#include "base/process/process_metrics.h"
-#include "base/stl_util.h"
#include "base/trace_event/process_memory_totals.h"
#include "base/trace_event/trace_event_argument.h"
@@ -55,7 +54,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* start_address,
#if defined(OS_MACOSX) || defined(OS_IOS)
std::vector<char> vec(page_count + 1);
// mincore in MAC does not fail with EAGAIN.
- result = mincore(chunk_start, chunk_size, vector_as_array(&vec));
+ result = mincore(chunk_start, chunk_size, vec.data());
if (result)
break;
@@ -66,7 +65,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* start_address,
int error_counter = 0;
// HANDLE_EINTR tries for 100 times. So following the same pattern.
do {
- result = mincore(chunk_start, chunk_size, vector_as_array(&vec));
+ result = mincore(chunk_start, chunk_size, vec.data());
} while (result == -1 && errno == EAGAIN && error_counter++ < 100);
if (result)
break;
« no previous file with comments | « base/stl_util.h ('k') | base/win/registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698