[Numpy-discussion] Byte aligned arrays

Sturla Molden sturla@molden...
Thu Dec 20 14:05:42 CST 2012

On 20.12.2012 20:57, Sturla Molden wrote:
> On 20.12.2012 20:52, Henry Gomersall wrote:
>> Perhaps the DLL should go and read MS's edicts!
> Do you link with same same CRT as Python? (msvcr90.dll)
> You should always use -lmsvcr90.
> If you don't, you will link with msvcrt.dll.

Here is VS2008, which uses malloc from msvcr90.dll:


"malloc is required to return memory on a 16-byte boundary"

If this does not happen, you are linking with the wrong CRT. When 
building C extensions for Python, we should always link with the same 
CRT as Python uses, unless you are 100% certain that CRT resources are 
never shared with Python.


More information about the NumPy-Discussion mailing list