Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper memory alignment. #3

Open
mrgreywater opened this issue Dec 17, 2015 · 0 comments
Open

Improper memory alignment. #3

mrgreywater opened this issue Dec 17, 2015 · 0 comments

Comments

@mrgreywater
Copy link

Certain classes like SJoint have members that are required to be aligned by 16 Bytes for SSE (for matrix4 operations). They are however allocated with "new", which causes exceptions whenever you run into alignment issues.

SJoint should be therefore allocated with memalign/__aligned_malloc, not the default new as is the case here:

AllJoints.push_back(new SJoint);

(Example exception caused by not properly aligned allocation: http://i.imgur.com/63AL48a.png)

edit: here is a simple fix (only tested the windows path)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant