program leak because creating new mutexes?



Hello.

I'm having a strange problem with my multi-threaded application. It
leaks memory. I've executed it under valgrind and valgrind reports that
calls to g_mutex_new_posix_impl() allocates around 22 MB of memory.

The thing is that I create around 4 mutexes max. And the longer the
program runs, more memory leaks because of g_mutex_new_posix_impl(). But
I do _lock()/_unlock() the mutexes a lot if it helps.

The valgrind trace of the leak goes like that:
- malloc()
- g_malloc()
- g_mutex_new_posix_impl()
- g_thread_init_glib()
- main()

Valgrind says that the bytes are still reachable.

Any idea?

Greets,
Luka


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]