[Mesa-dev] [PATCH] vega: fix for object handle leak

Andreas Pokorny andreas.pokorny at gmail.com
Sat Dec 15 14:48:52 PST 2012

I have been chasing a leak with OpenVG mesa-8.0.5.

Massif gave me the following stack:
->09.66% (3,471,568B) 0xB706B80: util_hash_table_set (u_hash_table.c:163)
| ->09.66% (3,471,568B) 0xB4E106F: create_handle (handle.c:83)
|   ->09.66% (3,471,568B) 0xB527B7D: vg_init_object (vg_context.c:186)
|     ->06.56% (2,358,352B) 0xB4E3599: paint_create (paint.c:201)
|     | ->06.56% (2,358,320B) 0xB4DAF4F: vegaCreatePaint (api_paint.c:37)

Within the first snapshots this stack only occupies a small portion of
the memory below the thresholds. This portion grows to 9% after 100
seconds of slow mode rendering.The application that creates the
paints, frees them right after use.. I only discovered the issue with
paints, since all other handles (paths, images..) are kept alive and
are reused for the next frame.

With the patch applied the leak is gone, and the memory usage stays
constant. The patch is against MesaLib-9.0.1 since I could not clone
from annongit.freedesktop.org.

Andreas Pokorny (1):
  vega: fix for object handle leak

 src/gallium/state_trackers/vega/mask.c  |    1 +
 src/gallium/state_trackers/vega/paint.c |    4 +++-
 src/gallium/state_trackers/vega/path.c  |    2 ++
 src/gallium/state_trackers/vega/text.c  |    2 ++
 4 files changed, 8 insertions(+), 1 deletion(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vega-fix-for-object-handle-leak.patch
Type: application/octet-stream
Size: 2474 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121215/48208d5e/attachment.obj>

More information about the mesa-dev mailing list