CCM memory optimization (little change, huge optim)