next: add support of memory layout