Stefan Krah <ste...@bytereef.org> added the comment: > The ways we've discussed using aligned allocation in numpy wouldn't follow > this requirement without special checking. Which isn't necessarily a big > deal, and numpy won't necessarily use this API anyway. But I would suggest > being very clear about exactly what you guarantee and what you don't :-).
In the GitHub issue we sort of decided to make the more relaxed Posix semantics official: 'alignment' must be a power of 2 and a multiple of 'sizeof(void *)'. 'size' can be really anything, so it should work for numpy. It's a pity that Posix does not round up align={1,2,4} to 'sizeof(void *)' automatically (why not?), so the applications will have to do that. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue18835> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com