I have made a few changes to the way bullet handles its memory, and I'd like to offer them as options to be merged into the next release (so I have less merges

inside of btHashesdOverlappingPairCache I found it did quite a few allocs/reallocs as the number of objects increased. This fragmented my memory quite a bit, so I added a consructor that allocates the hash table to an initial size, so it doesnt need to do all those small allocs/reallocs as it expands heres what I added:
> btHashedOverlappingPairCache::btHashedOverlappingPairCache(int initialAllocatedSize):
> m_overlapFilterCallback(0),
> m_blockedForChanges(false)
> {
> m_overlappingPairArray.reserve(initialAllocatedSize);
> growTables();
> }
>
I also changed the call to this constructor in btAxisSweep3.h:
< m_pairCache = new(ptr) btHashedOverlappingPairCache();
---
> m_pairCache = new(ptr) btHashedOverlappingPairCache(userMaxHandles);
I added code to the constraint solver: btSequentialImpulseConstraintSolver::reset() to free up any memory it was using, so I could free up all the memory it was using without shutting down bullet. This allowed me to free this memory if I was destroying the last scene I was using:
void btSequentialImpulseConstraintSolver::reset()
{
m_btSeed2 = 0;
m_tmpSolverBodyPool.clear();
m_tmpSolverConstraintPool.clear();
m_tmpSolverFrictionConstraintPool.clear();
m_orderTmpConstraintPool.clear();
m_orderFrictionConstraintPool.clear();
}
Thanks
Russ