Commit 54a69f9a authored by Santosh Mahto's avatar Santosh Mahto

Let physical memory be calculated at runtime when

--enable-low-end-device-mode cmdline is used.

When we run CEF with cmdline args --enable-low-end-device-mode,
physical memory size is assumed to be 512mb by default. This patch
changes this to  calculate memory size at runtime as done when
enable-low-end-device-mode is not enabled.
parent 2c1199a6
......@@ -462,5 +462,9 @@ patches = [
{
# Collabora: Set wayland input region for window.
'name': 'update_input_region',
},
{
# Collabora: Use the calculated physical memory.
'name': 'use_calculated_memory_for_low_end',
}
]
diff --git base/system/sys_info.cc base/system/sys_info.cc
index 5328e0002c8a..12146cf8b568 100644
--- base/system/sys_info.cc
+++ base/system/sys_info.cc
@@ -43,10 +43,12 @@ int GetLowMemoryDeviceThresholdMB() {
// static
int64_t SysInfo::AmountOfPhysicalMemory() {
+#if 0
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableLowEndDeviceMode)) {
return GetLowMemoryDeviceThresholdMB() * 1024 * 1024;
}
+#endif
return AmountOfPhysicalMemoryImpl();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment