[Pixman] [BUG REPORT] pixman_glyph_cache_create leaks memory that it allocates
Emil Velikov
emil.l.velikov at gmail.com
Sun Sep 17 12:18:01 UTC 2017
Hi Yuri,
On 15 September 2017 at 22:41, Yuri <yuri at rawbw.com> wrote:
> google-perftools memory profile on a gtkmm-based app shows that there is
> 0.3MB of memory left by pixman_glyph_cache_create.
>
>
> pixman should free all memory that it allocates. For example, if the app
> will load the gtkmm UI dynamically, this memory will be permanently lost
> every time, resulting in the memory leak.
>
>
> pixman-0.34.0
>
Keep in mind that I'm not a pixman developer, so take the following
with a grain of salt.
Skimming through the pixman code - this seems like an user error.
Namely are you sure the application has not forgot to free the cache
before destroying it?
Pay special attention to stderr, as pixman_glyph_cache_destroy() is
invoked. You should see a lovely "*** BUG ***" with extra information.
As a sanity check - the following shows no leaks in the mentioned code path*.
$ cat pp.c
// gcc -O0 -I/usr/include/pixman-1 -lpixman-1 -o pp-test && valgrind pp-test
#include <pixman.h>
int
main(void)
{
pixman_glyph_cache_destroy(pixman_glyph_cache_create());
return 0;
}
HTH
Emil
* There are some 'leaks' due to the custom DSO constructor, but let's
look at that separately.
More information about the Pixman
mailing list