add memory layout