Added a function for tracing memory allocations in OpenCL.