diff options
| author | Torne (Richard Coles) <torne@google.com> | 2019-05-06 16:24:54 -0400 |
|---|---|---|
| committer | Torne (Richard Coles) <torne@google.com> | 2019-05-06 16:24:54 -0400 |
| commit | 4d72998fdadf17429f6868dae76c4d2e7b6be7b1 (patch) | |
| tree | c2c0534815ebcbbe55d6012e12eac9b3f5755821 /core/java/android/webkit/WebViewLibraryLoader.java | |
| parent | 370132a52b5338139469a8dbb6cf1a592bd41a30 (diff) | |
Increase 32-bit WebView VA reservation.
Most pre-Q devices actually reserved around 130MiB in the 32-bit zygote
for the WebView native library; 100MiB was only the lower limit and the
file size based calculation that older OS versions use would come up
with a larger number. Increase the hardcoded value for Q to 130MiB so
that the behaviour is roughly the same across OS versions.
Fixes: 132081320
Test: manually verified via inspection of process maps
Change-Id: I0f03ac2f118bb0627ea6be229e5064d4590d8afb
Diffstat (limited to 'core/java/android/webkit/WebViewLibraryLoader.java')
| -rw-r--r-- | core/java/android/webkit/WebViewLibraryLoader.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/webkit/WebViewLibraryLoader.java b/core/java/android/webkit/WebViewLibraryLoader.java index 5a6aebaaad51..be49fc434c79 100644 --- a/core/java/android/webkit/WebViewLibraryLoader.java +++ b/core/java/android/webkit/WebViewLibraryLoader.java @@ -181,9 +181,9 @@ public class WebViewLibraryLoader { boolean is64Bit = VMRuntime.getRuntime().is64Bit(); // On 64-bit address space is really cheap and we can reserve 1GB which is plenty. // On 32-bit it's fairly scarce and we should keep it to a realistic number that - // permits some future growth but doesn't hog space: we use 100MB which is more than 2x - // the current requirement. - long addressSpaceToReserve = is64Bit ? 1 * 1024 * 1024 * 1024 : 100 * 1024 * 1024; + // permits some future growth but doesn't hog space: we use 130MB which is roughly + // what was calculated on older OS versions in practice. + long addressSpaceToReserve = is64Bit ? 1 * 1024 * 1024 * 1024 : 130 * 1024 * 1024; sAddressSpaceReserved = nativeReserveAddressSpace(addressSpaceToReserve); if (sAddressSpaceReserved) { |
