[Intel-gfx] intel driver video memory leakage in "intel_region_release" function?
slahs
slahs at 126.com
Sat Sep 26 15:05:58 CEST 2009
hello there,
=========================================================
intel_region_release(struct intel_region **region)
{
if (!*region)
return;
DBG("%s %d\n", __FUNCTION__, (*region)->refcount - 1);
ASSERT((*region)->refcount > 0);
(*region)->refcount--;
if ((*region)->refcount == 0) {
assert((*region)->map_refcount == 0);
if ((*region)->pbo)
(*region)->pbo->region = NULL;
(*region)->pbo = NULL;
dri_bo_unreference((*region)->buffer);
free(*region);
}
*region = NULL;
}
==========================================
If there are two contexts made current on this region of rb, after "(*region)->refcount--;" is it possible refcount still be larger than "0", and it will not be free then leaked?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090926/c45aeb53/attachment.html>
More information about the Intel-gfx
mailing list