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

Unified Diff: third_party/WebKit/Source/platform/wtf/ProcessMetrics.h

Issue 2925073002: Move malloc/partition_alloc memory usage functions to base (Closed)
Patch Set: Moved to ProcessMetrics method, etc Created 3 years, 6 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 | « third_party/WebKit/Source/platform/wtf/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/wtf/ProcessMetrics.h
diff --git a/third_party/WebKit/Source/platform/wtf/ProcessMetrics.h b/third_party/WebKit/Source/platform/wtf/ProcessMetrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..c624dd3ab7b5f08dc2158add755c49e3cf9e3d42
--- /dev/null
+++ b/third_party/WebKit/Source/platform/wtf/ProcessMetrics.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ProcessMetrics_h
+#define ProcessMetrics_h
+
+#include "base/process/process_metrics.h"
+
+namespace WTF {
+
+size_t GetMallocUsage() {
+ std::unique_ptr<base::ProcessMetrics> metric(
+ base::ProcessMetrics::CreateCurrentProcessMetrics());
+ return metric->GetMallocUsage();
+}
+
+} // namespace WTF
+
+#endif // ProcessMetrics_h
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698