Backport memory manager (mm) from ics_chocolate