Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议开放KOOM初始化时的设备最低存储空间容量检测自定义配置功能 #22

Open
camelsmith opened this issue Aug 21, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@camelsmith
Copy link

建议开放KOOM初始化时的设备最低存储空间容量检测自定义配置功能。因想将该库引入设备端程序,设备端程序的可用存储空间可能低于5GB,对于设备端来说,门槛太高,建议开发参数配置,由开发者自行决定最低门槛。

目前源码看出可用空间必须大于5GB才允许初始化
/**

  • Koom runs when disk space is enough.
  • @return enough
    */
    public boolean isSpaceEnough() {
    String dir = KGlobalConfig.getRootDir();
    float space = KUtils.getSpaceInGB(dir);
    if (KConstants.Debug.VERBOSE_LOG) {
    KLog.i("koom", "Disk space:" + space + "Gb");
    }
    return space > KConstants.Disk.ENOUGH_SPACE_IN_GB;
    }
@AndroidInternal
Copy link
Contributor

有道理,后续增强相关功能

KConstants.Disk.ENOUGH_SPACE_IN_GB 这个值不是final的,可以先直接改这个值

@AndroidInternal AndroidInternal added the enhancement New feature or request label Aug 21, 2020
@waesteve
Copy link

赞同,相比512的heap 5G太大 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants