Question

I have read this article on the alignment: http://www.ibm.com/developerworks/library/pa-dalign/

The question what arises is how to find out memory access granularity for a specific processor?

For example Intel Xeon. Unfortunately google doesn't help me when I try "memory access granularity Intel Xeon" or "memory alignment Intel Xeon".

Était-ce utile?

La solution

For Xeon, take a look at the Intel Optimization Manual (which Google). In rough, rough generalities, architectures want datatypes aligned to the larger of their size or the processor's native width. So x86 wants 4-byte alignment, but __m128's should be 16-byte aligned. x64 wants 8-byte alignment. It's not a hard and fast rule, though, since some 64-bit architectures only care about 4-byte alignment.

One more thing: Xeon is a trademark, not an architecture. In fact there have been multiple architectures marketed as Xeon. So "memory alignment Intel Xeon" won't give you much; "memory alignment x64" will give you plenty. And memory alignment requirements are going to be pretty much the same across multiple implementations of the same architecture.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top