Comments (4)
This should work.
Would be interesting to determine the root cause.
from gvdb-voxels.
Hmm, is there any destructor in the VolumeGVDB class that deallocate the following members (allocated in VolumeGVDB::Initialize)?
- mCudpp (CPU and GPU leak ?)
- mPlan_max (CPU and GPU leak ?)
- mPlan_min (CPU and GPU leak ?)
- mScene (CPU leak ?)
- mPool (CPU and GPU leak ?)
- cuVDBInfo (GPU leak only)
- mTransferPtr (GPU leak only)
These are the ones for which I can't find any deallocation code and that I can (without a 100% certainty) relate to the trace given by a cuda-memcheck --leak-check full
invocation.
Additionnaly there is no member method of VolumeGVDB that release the memory allocated by mPool.
I have to do something like (not sure what is absolutely necessary or not though):
gvdb->DestroyChannels();
gvdb->CleanAux();
gvdb->mPool->PoolReleaseAll();
gvdb->Clear();
But it doesn't solve the leak from the above-mentioned members.
from gvdb-voxels.
Hi all,
I finally implemented destructors for most of the main GVDB classes in cpmmits dc4d3a0 and f0d05bb.
This makes it so that
while (1) { nvdb::VolumeGVDB gvdb; gvdb.SetCudaDevice(GVDB_DEV_CURRENT); gvdb.Initialize(); }
should run without leaking memory (testing in gRenderKernel
, the amount of memory used appears to be constant). Note that it's important to use GVDB_DEV_CURRENT
when creating and destroying GVDB objects in a loop like this - otherwise, each GVDB instance will create a new CUDA context just for that instance, and since GVDB allows user code to pick up on the generated CUDA context, will keep the context around (and consequently accumulate CUDA contexts if run in a loop)!
while (1) { nvdb::VolumeGVDB gvdb; gvdb.SetCudaDevice(GVDB_DEV_FIRST); gvdb.Initialize(); }
In addition, cuda-memcheck --leak-check full
should now run cleanly (with the exception of a CUDA/OpenGL interop error) on the three non-interactive samples.
Please let me know if this significantly breaks things, since it also slightly changes the semantics of setting the scene's camera and light objects (these functions now own the pointers that you pass to them), and could cause problems with applications that shared pointers to the same object across multiple volumes.
Hope this helps!
from gvdb-voxels.
Closing, since this seems to have been fixed by the commit described in the last post.
from gvdb-voxels.
Related Issues (20)
- CMake Error at source/gvdb_library/CMakeLists.txt:225 (target_link_libraries): The "optimized" argument must be followed by a library. HOT 2
- GVDB CUDA ERROR: the provided PTX was compiled with an unsupported toolchain HOT 2
- Error Buiding OpenVDB Samples HOT 1
- Hardware Requirement HOT 2
- Missing case for T_FLOAT4 in AllocateTextureGPU
- GVDB CUDA ERROR with T_UCHAR channel in UpdateAtlas() -> Allocator::AllocateTextureGPU
- Which commit/version of NanoVDB should I use? HOT 5
- UpdatePolygons OptixScene not working
- Error thrown in RebuildTopology()
- How to add and display multiple models to a scene?
- Error when run the samples
- nanovdb has no member "mOffset" and "childID" , what version nanovdb is needed?
- How to load multiple vdb?
- compilation errors in gvdb_cutils.cu with CUDA 12 HOT 1
- compilation errors in gvdb_cutils.cu with CUDA 12 HOT 1
- How to manage the format of source codes, since the .clang-format file is NOT offered?
- NOT FOUND. GVDB Ptx/Glsl. (ptx or glsl missing) HOT 1
- Allocate bricks for negative values in the world space
- VolumeGVDB::RenderKernel ERROR: an illegal memory access was encountered
- PTX JIT compilation failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gvdb-voxels.