Sign in to follow this  
cvet

asSetGlobalMemoryFunctions thread cleanup

Recommended Posts

cvet    270

Hello.

I think better place asThreadCleanup in asSetGlobalMemoryFunctions, because now we can allocate thread memory with one allocator, but deallocate with other.

For now asThreadCleanup placed only in asResetGlobalMemoryFunctions.

I encounter this error and take some hours to find what happening, better to avoid this situations for others.

Or at least need place notice in function description about this behaviour.

Share this post


Link to post
Share on other sites
WitchLord    4678

I'm afraid I may not understand you perfectly.

 

Can you perhaps give a step by step description of what you did in your application and where it caused problems?

 

Did you call asSetGlobalMemoryFunctions more than once in your application from different threads?

Share this post


Link to post
Share on other sites
cvet    270

Yes, that what I mean - add asThreadCleanup in asSetGlobalMemoryFunctions.

For example string in TLS can be allocated with release userAlloc, but deleted with debug userFree.

For now string clean-upped before memory functions changed and this problem not happens.

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this