Increase the size of selected binder caches
Bug: 237309566 The maximum size of selected binder caches is increased to avoid overflow. The overflow was found in a partner bug report. The maximum size does not affect memory consumption until the cache hits the limit, so caches that were not overflowing before will not see increased memory consumption. Also, the caches that are affected by this change are either static (one per process) or exist in just a few intances per process, so the total memory impact is small. Note that most of the overflows occurred in vendor processes. Test: atest * android.app.ApplicationPackageManagerTest * com.android.server.pm.PackageManagerTests * com.android.server.pm.PackageManagerServiceTest * com.android.server.compat.PlatformCompatTest * com.android.server.compat.CompatConfigTest * android.app.compat.CompatChangesTest * PlatformCompatGating Change-Id: I7f60ad9008bf894d6cb967ce1a54ab33af650efc
This commit is contained in:
@@ -32,7 +32,7 @@ import com.android.internal.compat.IPlatformCompat;
|
||||
public final class ChangeIdStateCache
|
||||
extends PropertyInvalidatedCache<ChangeIdStateQuery, Boolean> {
|
||||
private static final String CACHE_KEY = "cache_key.is_compat_change_enabled";
|
||||
private static final int MAX_ENTRIES = 20;
|
||||
private static final int MAX_ENTRIES = 64;
|
||||
private static boolean sDisabled = false;
|
||||
private volatile IPlatformCompat mPlatformCompat;
|
||||
|
||||
|
||||
@@ -10416,7 +10416,7 @@ public abstract class PackageManager {
|
||||
private static final PropertyInvalidatedCache<ApplicationInfoQuery, ApplicationInfo>
|
||||
sApplicationInfoCache =
|
||||
new PropertyInvalidatedCache<ApplicationInfoQuery, ApplicationInfo>(
|
||||
16, PermissionManager.CACHE_KEY_PACKAGE_INFO,
|
||||
32, PermissionManager.CACHE_KEY_PACKAGE_INFO,
|
||||
"getApplicationInfo") {
|
||||
@Override
|
||||
public ApplicationInfo recompute(ApplicationInfoQuery query) {
|
||||
@@ -10517,7 +10517,7 @@ public abstract class PackageManager {
|
||||
private static final PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>
|
||||
sPackageInfoCache =
|
||||
new PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>(
|
||||
32, PermissionManager.CACHE_KEY_PACKAGE_INFO,
|
||||
64, PermissionManager.CACHE_KEY_PACKAGE_INFO,
|
||||
"getPackageInfo") {
|
||||
@Override
|
||||
public PackageInfo recompute(PackageInfoQuery query) {
|
||||
|
||||
Reference in New Issue
Block a user