Quasar C++ API: memory leaks profiling has no effect?

Private: Q&ACategory: QuestionsQuasar C++ API: memory leaks profiling has no effect?
Frank Vernaillen asked 7 years ago

I am working on an application that uses the Quasar C++ API. When the application terminates, Quasar provides the following feedback:

============ Memory subprogram DEBUG diagnostics ============
CPU Memory usage: 36147 KB
CPU Kernel dynamic memory: total 66306 KB, in use 0 KB
6 matrices in GPU memory!
9 msec spent on allocations.
GPU Kernel dynamic memory: total 66306 KB, in use 0 KB
Max device memory use: 75600 KB.
============================================================

To debug the GPU memory leak I tried to enable memleaks profiling by calling EnableProfiling(PROFILE_MEMLEAKS) on the Quasar host object. This does not seem to have any effect whatsoever. Also, the method EnableProfiling(PROFILE_MEMLEAKS) returns 0, but I am not sure if this indicates success or failure…
Am I correct to expect some output from EnableProfiling in this case?
My Quasar version is “Quasar 1.0.6145.26011 – build date 28-Oct-16 2:27:01 PM – 64-bit”.

1 Answers
bgoossen Staff answered 7 years ago

Indeed, the result of EnableProfiling(PROFILE_MEMLEAKS) should be true (indicating success). In the next release, this issue will be fixed.

Note that the memory leak detector can currently only handle interpreted Quasar code, when the memory allocation is performed elsewhere, the memory leak detector will give the size of the allocation and the number of allocations of this size, but it cannot pinpoint the exact origin in the code where the allocation has been performed.