[Numpy-discussion] Byte aligned arrays
Sturla Molden
sturla@molden...
Thu Dec 20 10:48:21 CST 2012
On 19.12.2012 19:25, Henry Gomersall wrote:
> That is not true at least under Windows 32-bit. I think also it's not
> true for Linux 32-bit from my vague recollections of testing in a
> virtual machine. (disclaimer: both those statements _may_ be out of
> date).
malloc is required to return memory on 16 byte boundary on Windows.
http://msdn.microsoft.com/en-us/library/ycsb6wwf.aspx
On Windows we can also use _aligned_malloc and _aligned_realloc to
produce the alignment we want.
_aligned_malloc(N, 4096); // page-aligned memory
Sturla
More information about the NumPy-Discussion
mailing list