Memory management with all stages