[Pixman] How pixman_implementation_t is getting free

kb pachauri kb.pachauri at gmail.com
Tue Nov 2 20:05:39 PDT 2010


OpenCL Spec Says:

The life span of an OpenCL object is determined by its reference
count—an internal count of the number of references to the object. When you
create an object in OpenCL,
its reference count is set to one. Subsequent calls to the appropriate
retain API (such as clRetainContext, clRetainCommandQueue) increment the
reference count. Calls to
the appropriate release API (such as clReleaseContext,
clReleaseCommandQueue) decrement the reference count. After the reference
count reaches zero, the object’s resources are
deallocated by OpenCL.

So i think those cannot be free when process exit...

rightnow i just use destructor function attribute as suggested by andrea ..
it solves my problem..

Also when i am using opencl profiler to profile some pixman tests, sometime
my profiling results are not save.. (one possible reasons it says opencl
resource are not freed properly)



On Tue, Nov 2, 2010 at 9:02 PM, Soeren Sandmann <sandmann at daimi.au.dk>wrote:

> kb pachauri <kb.pachauri at gmail.com> writes:
>
> > Actually what i mean for freeing memory is .. freeing the opencl context,
> > releasing command queue, all opencl kernels etc...
> >
> > sorry for not too clear in my words..
> >
> > I dont think this will be freed until i free the context..
>
> But why do you want to free it? Don't these things get freed when the
> process exits?
>
>
> Soren
>



-- 
Kulbhushan Pachauri
Lead Engineer
SAIT-India Lab
Samsung India Software Operation Pvt. Ltd.
Bangalore-560093
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20101103/21eacfa1/attachment.html>


More information about the Pixman mailing list