4 ms·
I feel that the problem is ill-posed: "At what amount of free RAM should we start freeing RAM by killing processes?" Maybe one should solve the problem: "At wh
by anticristi 7y ago
I feel that the problem is ill-posed: "At what amount of free RAM should we start freeing RAM by killing processes?"
Maybe one should solve the problem: "At what eviction-induced latency should the OOM killer be invoked." Thanks to the infrastructure around latencytop, the latency might be available already.
Of course, the never-ending dilemma of what process to kill is still there.
- AstralStorm 7y agoPreferably none. Saner APIs like Android will call low memory signals and start swapping out applications both ahead of time and as needed. It also has a relatively smart memory manager to detect unexpected vs expected spikes as well as slow leaks. POSIX has no such API. It was designed in a simple time.
- anticristi 7y agoCan you point to documentation on how Android deals with low-memory situations? My understanding is that: (A) They moved the problem to user-space. (B) Apps are supposed to constantly save the state they care about and expect to be killed whenever Android sees fit (or even at every app switch for developers).