Android knows these pages can be recovered from the disk, so they can be paged out if the system needs memory somewhere else.
Any files or resources which are present on the disk, such as code, are kept in mmap’ed pages. Unlike PCs, Android does not offer swap space for memory, however it does use paging and memory-mapping. There are two kinds of memories when it comes to Android: Clean RAM and Dirty RAM. This article covers best practices for memory usage.
While there are many mechanisms to reduce Android footprint and reduce memory overhead (such as headless Android mode, low memory Android configurations, etc.) ensuring that the application code also effectively uses available memory is important. While phones and tablets are getting very powerful (with quad core processors and 2+GB RAM having become the de facto standard) this is certainly not the case with many other IoT devices where due to cost margins, the need of the day is still lower powered CPUs and lesser RAM (as RAM is an expensive part of any device BOM). However, getting Android to actually work effectively on diverse platforms is quite challenging.
Developing a new OEM product based on Android as an embedded OS makes a lot of sense compared to say, only using Linux as we have covered before. The OS is already making its way into a host of other smart devices, like Google Glass for example, in a movement toward what’s being called “ the internet of things” or IoT. For those tracking the evolution of Android, it is evident that the future of the Android based ecosystem goes far beyond just phones and tablets.