http://www.bulletphysics.org/Bullet/php ... 64&p=18373
After reading that, I did some looking at the btAlignedAllocator... the only code I could see that wouldn't be thread-safe would be the following:
Code: Select all
#include "btAlignedAllocator.h"
int gNumAlignedAllocs = 0;
int gNumAlignedFree = 0;
int gTotalBytesAlignedAllocs = 0;//detect memory leaks
...
Code: Select all
#include "btAlignedAllocator.h"
#include <atomic>
std::atomic<int> gNumAlignedAllocs = 0;
std::atomic<int> gNumAlignedFree = 0;
std::atomic<int> gTotalBytesAlignedAllocs = 0;//detect memory leaks
...
Is there anything else under the hood that would prevent multiple instances of btDiscreteDynamicsWorld from working in parallel? (Each one has its own dispatcher, broadphase, solver, and collision configuration instance)
Thanks for any help and/or advice anyone can offer!
