Loading core/java/android/webkit/WebViewCore.java +2 −7 Original line number Diff line number Diff line Loading @@ -188,14 +188,9 @@ final class WebViewCore { // Allow us to use up to our memory class value before V8's GC kicks in. // These values have been determined by experimentation. mLowMemoryUsageThresholdMb = manager.getLargeMemoryClass(); // If things get crazy, allow V8 to use up to 3 times our memory class, or a third of the // device's total available memory, whichever is smaller. This value must be no less // than the low memory threshold. // At that point V8 will start attempting more aggressive garbage collection. mHighMemoryUsageThresholdMb = Math.max(Math.min(mLowMemoryUsageThresholdMb * 3, (int) (memInfo.availMem / 3) >> 20), mLowMemoryUsageThresholdMb); mHighMemoryUsageThresholdMb = (int) (mLowMemoryUsageThresholdMb * 1.5); // Avoid constant V8 GC when memory usage equals to working set estimate. mHighUsageDeltaMb = 1; mHighUsageDeltaMb = mLowMemoryUsageThresholdMb / 32; // Send a message to initialize the WebViewCore. Message init = sWebCoreHandler.obtainMessage( Loading Loading
core/java/android/webkit/WebViewCore.java +2 −7 Original line number Diff line number Diff line Loading @@ -188,14 +188,9 @@ final class WebViewCore { // Allow us to use up to our memory class value before V8's GC kicks in. // These values have been determined by experimentation. mLowMemoryUsageThresholdMb = manager.getLargeMemoryClass(); // If things get crazy, allow V8 to use up to 3 times our memory class, or a third of the // device's total available memory, whichever is smaller. This value must be no less // than the low memory threshold. // At that point V8 will start attempting more aggressive garbage collection. mHighMemoryUsageThresholdMb = Math.max(Math.min(mLowMemoryUsageThresholdMb * 3, (int) (memInfo.availMem / 3) >> 20), mLowMemoryUsageThresholdMb); mHighMemoryUsageThresholdMb = (int) (mLowMemoryUsageThresholdMb * 1.5); // Avoid constant V8 GC when memory usage equals to working set estimate. mHighUsageDeltaMb = 1; mHighUsageDeltaMb = mLowMemoryUsageThresholdMb / 32; // Send a message to initialize the WebViewCore. Message init = sWebCoreHandler.obtainMessage( Loading