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

Unified Diff: base/process_util.h

Issue 7607035: CrOS - Memory debug widget shows anonymous memory and renderer kills. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing review comments Created 9 years, 4 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 | base/process_util_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util.h
diff --git a/base/process_util.h b/base/process_util.h
index acaa2d71864feefbf95954abd4879f27cb22c78a..b98e266a97870d7231279b6cc91c9194dfa60638 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -657,11 +657,23 @@ class BASE_EXPORT ProcessMetrics {
};
#if defined(OS_LINUX)
+// Data from /proc/meminfo about system-wide memory consumption.
+// Values are in KB.
+struct SystemMemoryInfoKB {
+ SystemMemoryInfoKB() : total(0), free(0), buffers(0), cached(0),
+ active_anon(0), inactive_anon(0), shmem(0) {}
+ int total;
+ int free;
+ int buffers;
+ int cached;
+ int active_anon;
+ int inactive_anon;
+ int shmem;
+};
// Retrieves data from /proc/meminfo about system-wide memory consumption.
-// Values are in KB. Returns true on success.
-BASE_EXPORT bool GetSystemMemoryInfo(int* total_kb, int* free_kb,
- int* buffers_kb, int* cache_kb,
- int* shmem_kb);
+// Fills in the provided |meminfo| structure. Returns true on success.
+// Exposed for memory debugging widget.
+BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
#endif
// Returns the memory committed by the system in KBytes.
« no previous file with comments | « no previous file | base/process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698