I would like to ask if any extra steps are required while Cloo to avoid memory leak. I experiencing memory leak in my C# program (task manager shows that my application is consuming more and more RAM with every kernel execution).
I rewrote code of my app to C (so only OpenCL API is used) and this application is running without any problems associated with RAM consumption.
How big is problem? Really big. C# app using Cloo consumes something about 1.6GB of RAM until it computes result while C version eats constantly ~60MB of RAM.
The answer to the first question is no. However, if you do experience leaks (and you're absolutely sure it isn't the garbage collector delaying its job], there are two possible error sources:
1) Your own app is leaking. GCHandles, bad kernels etc. A *LOT* of leaks fall into this category so quadruple check this one.
2) Cloo is faulty. If you rewrite a suspicious part of the code from ComputeStuff into CL calls and CL*Handle structs (these work the same as in C/C++), you should be able to tell this one. Or just post the working buggy code somewhere (pastebin) and I'll try to help. Unfortunately, I'm not always available, so this could takes from minutes to days. Sorry, I have to go to work sometimes :)
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.