[SciPy-user] numpy aligned memory

Pauli Virtanen pav@iki...
Sun Mar 8 12:27:55 CDT 2009

Sun, 08 Mar 2009 22:33:32 +0530, Rohit Garg wrote:
> I saw this
> http://www.mail-archive.com/numpy-discussion@scipy.org/msg04005.html
> while googling for numpy memory alignment. I wish to know if anything on
> that account has come to pass yet? On linux 64 bit platform, can I
> assume anything beyond the glibc alignment as of now?

You cannot assume even glibc alignment, unless the array has the ALIGNED 
flag set. (This has actually caused a few bugs also in Numpy & Scipy, cf. 
eg. #551.) For example unpickling can produce arrays that are not aligned 
at itemsize boundaries, if the original array did not have its ALIGNED 
flag set.

Pauli Virtanen

More information about the SciPy-user mailing list