> I gather Google's phone OS have something similar
Android apps are written in Java. So the standard approach for doing this is to use Java's weak & soft references which basically tell the GC that, "hey, I've used this memory but if you really need it back, you can have it!".
http://developer.android.com/reference/java/lang/ref/SoftRef...