more on memory issues with the library.
Posted: Thu Nov 01, 2012 11:04 pm
Is there any documentation or centralized information on the memory-use philosophies behind the bullet libraries?
I've found several threads, going back a few years, where it's discussed. The 'btAlignedXXX' system, including the setCustom functions, seems to be the core of bullet's memory use. The BT_DECLARE_ALIGNED_ALLOCATOR macro seems to be the way that classes are defined to use this memory subsystem. However, it doesn't seem to be universally applied - lots of classes don't use it.
There is also a discussion about smart-pointers and order-of-release issues, where it's pointed out that it's the user's responsibility to control the sequence where objects are created and destroyed.
My understanding is that the source code in the 'Extras' and 'Demos' folders isn't as fully developed as the main source, but I was surprised to find that some objects (e.g. the btDefaultCollisionConstructionInfo object) in the 'src' folders don't use the btAligned system. Is there an intent to make the use of btAligned memory allocations universal throughout the library?
Hasn't this been an issue for other users? Are most of you just using ::operator-new instead of controlling all memory with a pool system, or do you modify the bullet libraries when needed?
I've found several threads, going back a few years, where it's discussed. The 'btAlignedXXX' system, including the setCustom functions, seems to be the core of bullet's memory use. The BT_DECLARE_ALIGNED_ALLOCATOR macro seems to be the way that classes are defined to use this memory subsystem. However, it doesn't seem to be universally applied - lots of classes don't use it.
There is also a discussion about smart-pointers and order-of-release issues, where it's pointed out that it's the user's responsibility to control the sequence where objects are created and destroyed.
My understanding is that the source code in the 'Extras' and 'Demos' folders isn't as fully developed as the main source, but I was surprised to find that some objects (e.g. the btDefaultCollisionConstructionInfo object) in the 'src' folders don't use the btAligned system. Is there an intent to make the use of btAligned memory allocations universal throughout the library?
Hasn't this been an issue for other users? Are most of you just using ::operator-new instead of controlling all memory with a pool system, or do you modify the bullet libraries when needed?