Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d72998f authored by Torne (Richard Coles)'s avatar Torne (Richard Coles)
Browse files

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
parent 370132a5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {