Android Memory Overview [Part2] - Android LMKD
Introduction In the last tutorial we saw the need and a high level overview of the Low Memory situations and different ways to understand and assign the processes a score which can be used to kill/not kill them when low mwmory conditions happen. Android uses lmkd [LowMemoryKiller Daemon] running in userspace to determine a low memory condition and kill processes as necessary. Let us see the details of the lmkd implementation. Android Low Memory Killer Daemon – Detailed Walkthrough. Android LowMemoryKillerDaemon Startup When Android’s init process parses init.rc, We can see that the memcg [memory cgroup] is initialized Again, Moving further the init.rc starts the lmkd service process. The source for the lmkd is located in platform/system/memory/lmkd. https://android.googlesource.com/platform/system/memory/lmkd/ Let us look at the main function of the lmkd with some important items mark...