set memlayout