finetuning memory layout setup