choose memory layout at compile time