Hi,
I am trying to profile my application using CodeXL and have been receiving warnings showing Memory leaks in different positions where I cannot see any memory leak happening. I am receiving messages like this:
Memory leak detected [Ref = 1, Handle = 0x000000000467D7B0]: Object created by clCreateCommandQueue
This is the code for creating command queue:
commands = clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &err);
I am receiving similar messages for clCreateProgramWithSource, clEnqueueNDRangeKernel, clEnqueueWriteBuffer etc.
I would like to ask what might be the source of the warning or if I have to change any function call.
Solved! Go to Solution.
Hi,
Do you use AMD APP SDK utils files? if yes, there is a known issue and will be fixed in upcoming release.
Do you use events in the clEnqueueWriteBuffer and ClEnqueueNDRangeKernel API calls? If yes, don't forget to release all them.
Regards,
Ravi
Hi,
Do you use clReleaseCommandQueue? It will flush any remaining commands from the Q. If you still have commands left in Q when you finish, they may register as memory leaks.
Yes I have. If that is true, how can the same be said for clEnqueueWriteBuffer and ClEnqueueNDRangeKernel?
Hi,
Do you use AMD APP SDK utils files? if yes, there is a known issue and will be fixed in upcoming release.
Do you use events in the clEnqueueWriteBuffer and ClEnqueueNDRangeKernel API calls? If yes, don't forget to release all them.
Regards,
Ravi
Yes, I do use the AMD APP SDK files.
I used NULL throughout. I have used events and then released them to find that the warnings go away. Thanks.