Message292257
> On for example x32 malloc returns 16 byte aligned memory but size_t is 4 bytes.
x32 is a strange platform :-( Does numpy support it? I'm not sure that Python works on such platform.
I suggest to hardcode 16 or 32 bytes in _PyMem_DebugRawAlloc instead of relying on sizeof(size_t). pymalloc aligns memory allocations to 8 bytes if I recall correctly.
> How it cause problem?
numpy uses SIMD instructions which require strict memory alignement.
Note: There was also an issue #18835 to "Add aligned memory variants to the suite of PyMem functions/macros", but it was rejected. |
|
Date |
User |
Action |
Args |
2017-04-25 09:05:45 | vstinner | set | recipients:
+ vstinner, methane, jtaylor, mapreri |
2017-04-25 09:05:45 | vstinner | set | messageid: <1493111145.88.0.621571946728.issue30150@psf.upfronthosting.co.za> |
2017-04-25 09:05:45 | vstinner | link | issue30150 messages |
2017-04-25 09:05:45 | vstinner | create | |
|