-
- Downloads
Fix #118402: enforce expected minimum alignment in MEM_CXX_CLASS_ALLOC_FUNCS
This `operator new` added in ecc3e78d are only called if the alignment is greater than `__STDCPP_DEFAULT_NEW_ALIGNMENT__`. This is generally 8 or 16 depending on the platform. `MEM_mallocN` does guarantee 16 byte alignment currently (in fact it's usually not 16 byte aligned because of `MemHead`). Now `MEM_mallocN_aligned` is used with the default alignment, even if we don't know that the type does not require it. An alternative would be to pass the alignment to `MEM_CXX_CLASS_ALLOC_FUNCS`, but that would be more intrusive. Pull Request: https://projects.blender.org/blender/blender/pulls/118568
Please register or sign in to comment