Make memory optimization.