Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Categories
- All Discussions1,524
- General534
- Graphics109
- GPU Computing419
- Mobile141
- Pro Graphics163
- Tools158
In this Discussion
- Hai Loc Lu February 13
- LeoKim February 10
Tags in this Discussion
- physx 272
How can I release largely reserved internal memory in PhysX 3.x? PxScene::flush doesn't work.
-
Hello~
In my test, PxScene::flush doesn't release all its internal memory.
my test scenario is below.
===================================================
1. creating a scene and other aux jobs. - starting with 5MB memory usage.
2. creating nearly overlapped 8000 primitives(sphere/box/capsule) and insert them in a scene. - at this time it uses 688MB
3. releasing all actors. - now 496MB
4. PxScene::flush(). - still 472MB!!
5. PxScene::release(). - finally 17MB
* everystep above, i did simulate&fetchResult. tested in 3.1 & 3.1.2
===================================================
How can i release this memory? except releasing a scene.
I just want to reset it. -
3 Comments sorted by
-
Some memory is persistent internally across the frames. I don't think you can just PxScene::flush to get it down to almost zero. It depends on what you are doing currently. Do you have a lot of objects colliding, thus a lot of contacts, or enable debug rendering?
I guess you do because of 8000 overlapping primitives.
You can also progressively PxScene::addActor/removeActor that you are currently interested in.
Or releasing those actors that you don't need. -
First, thanks for your reply
It is not unacceptable that uncommonly placed objects take much memory.
But after that situation - I removed all actros from the scene, it still takes too much memory. that's a problem.
any solution?
-
Do you have a repro?
A PVD capture would be greatly appreciated. Thanks.