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

Unified Diff: base/sys_info_android.cc

Issue 12223064: base: Fix parsing and add dalvik-heap-limit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 7 years, 10 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
Index: base/sys_info_android.cc
diff --git a/base/sys_info_android.cc b/base/sys_info_android.cc
index 53801703845c972ff6449fea1da152427af674e5..7840250f04779e095e1952d83e93f3f700e04152 100644
--- a/base/sys_info_android.cc
+++ b/base/sys_info_android.cc
@@ -79,6 +79,12 @@ int GetDalvikHeapSizeMB() {
return ParseHeapSize(heap_size_str);
}
+int GetDalvikHeapGrowthLimitMB() {
+ char heap_size_str[PROP_VALUE_MAX];
+ __system_property_get("dalvik.vm.heapgrowthlimit", heap_size_str);
+ return ParseHeapSize(heap_size_str);
+}
+
} // anonymous namespace
namespace base {
@@ -122,4 +128,10 @@ int SysInfo::DalvikHeapSizeMB() {
return heap_size;
}
+int SysInfo::DalvikHeapGrowthLimitMB() {
+ static int heap_growth_limit = GetDalvikHeapGrowthLimitMB();
+ return heap_growth_limit;
+}
+
+
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698