Activity manager memory optimizations