Memory management task.