Question about Havok6.5.0 and Override memory alloc

Question about Havok6.5.0 and Override memory alloc

Hi, I have a question This how can get Havok6.5.0 Lib for VS2005.
Other problem in i used havok6.0 lib. In mycode, Ioverride new and delete toallocated memory to be 4-byte aligned. when i used multithread of havok physics ( call stepMultiThreaded used hkPoolMemory), program be crash at a random time . But its fine in used single threaded ( call stepDeltaTime ). how can i make my code fine on multithread.
The last question is form my friend why Havok allocated memory to be 16-byte aligned.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi wushicl,

What kind of crashes are you getting when do this? Are they asserts or are they just general crashes? Why are you trying to set things to 4-byte aligned? What is your use-case? It's hard for me to say whhy it is crashing without a little more info.

In terms of why memory allocations are made 16-byte aligned, there are lots of reasons. Some architectures require 16-byte alignment, some architectures just work faster with 16-byte alignment, you need alignment in order to do some intrinsic operations, etc. There are lots of reasons for having 16-byte alignment.


Developer Support Engineer Havok

Hi Sean:
Thanks for your reply.I think my crashing reason by this. I overrides new/delete. The memory alloc not use hkThreadMemory's function. so it crashed in multitread at free memory or other things. I try to use hkAllocate function alloc physic item's this hkAllocate( 1, HK_MEMORY_CLASS_BASE ) But this time other trouble with me. how to call hkpRigidBody's constructor or other way initialization it.
My machine can't connect i just description my questions. so sorry.
Thanks for your answer.

Leave a Comment

Please sign in to add a comment. Not a member? Join today