16 byte alignment issue
问题 I am using DirectXMath , creating XMMatrix and XMVector in classes. When I call XMMatrixMultiply it throws unhandled exception on it. I have found online that it is an issue with byte alligment, since DirectXMath uses SIMD instructions set which results in missaligned heap allocation. One of the proposed solution was to use XMFLOAT4X4 variables and then change them to temporary XMMatrix whenever needed, but it isn't the nicest and fastest solution imo. Another one was to use _aligned_malloc ,