Index: base/sys_info.h |
diff --git a/base/sys_info.h b/base/sys_info.h |
index e35feff735e4ac3783d1870ae04d711ef7cdd7fc..9cf444a6ee46f8f9a38c2f8a629c8f274279d5de 100644 |
--- a/base/sys_info.h |
+++ b/base/sys_info.h |
@@ -18,6 +18,8 @@ |
namespace base { |
+struct SystemMemoryInfoKB; |
+ |
class BASE_EXPORT SysInfo { |
public: |
// Return the number of logical processors/cores on the current machine. |
@@ -28,7 +30,14 @@ class BASE_EXPORT SysInfo { |
// Return the number of bytes of current available physical memory on the |
// machine. |
+ // (The amount of memory that can be allocated without any significant |
+ // impact on the system. It can lead to freeing inactive file-backed |
+ // and/or speculative file-backed memory). |
static int64_t AmountOfAvailablePhysicalMemory(); |
+#if defined(OS_LINUX) || defined(OS_ANDROID) |
+ static int64_t AmountOfAvailablePhysicalMemory( |
+ const SystemMemoryInfoKB& meminfo); |
+#endif |
// Return the number of bytes of virtual memory of this process. A return |
// value of zero means that there is no limit on the available virtual |