gpt4 book ai didi

android - 前台 Activity 是否总是具有最低的 OOM 分数?

转载 作者:太空宇宙 更新时间:2023-11-03 11:02:39 25 4
gpt4 key购买 nike

我正在阅读内存不足 (OOM) killer ,以及 Android 如何确定进程的优先级 (https://developer.android.com/guide/components/processes-and-threads.html#Lifecycle)

似乎前台 Activity 应该总是具有最低的 oom_score,因此总是最后被杀死。但是,我遇到过启动器实际上具有比前台 Activity 更低的 oom_score 的情况。有谁知道为什么会出现这种行为?

最佳答案

启动器的 oom_score 始终低于前台 Activity,因为启动器永远不应关闭。

And the main reason behind this is launcher is the app/screen which get's launched (using ACTION_BOOT_COMPLETED intent) as first screen once device boots and also it's the screen where you go after everything is closed.

关于android - 前台 Activity 是否总是具有最低的 OOM 分数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38990506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com