4 ms·
Memory model experts: if you define the constants in the way this code has, will they be contiguous in memory? Or would it be better to allocate these in an ali
by kolbe 4y ago
Memory model experts: if you define the constants in the way this code has, will they be contiguous in memory? Or would it be better to allocate these in an aligned(64) array?
- sweetjuly 4y agoC provides no guarantees about the memory layout of distinct globals. If you want a specific contiguous layout, you need to define it as a buffer. In practice though, most linkers will place them contiguously since they are simply appended to the constants section in the order they are parsed.