diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -97,7 +97,7 @@ numfreeblocks--; return freeblocks[numfreeblocks]; } - b = PyMem_Malloc(sizeof(block)); + b = _PyMem_Malloc_Aligned(sizeof(block), 8*sizeof(PyObject *)); if (b != NULL) { return b; } diff --git a/Objects/setobject.c b/Objects/setobject.c --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -354,7 +354,7 @@ } } else { - newtable = PyMem_NEW(setentry, newsize); + newtable = _PyMem_NEW_ALIGNED(setentry, newsize, 8*sizeof(setentry *)); if (newtable == NULL) { PyErr_NoMemory(); return -1;