Comment 3 for bug 1017375

Revision history for this message
ArdyFalls (afalls) wrote :

Some of the 'leaks' can be removed by calling snd_config_update_free_global(), but this still leaves many reachable blocks...

updated test code attached: alsa-async.c

come of the valgrind output...

==5312== Memcheck, a memory error detector
==5312== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==5312== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==5312== Command: ./alsa-async /home/ardy/workspace/ASound/res/raw/explosion.ogg
==5312==
Initalize alsa {2 channels, 44100hz}
==5312==
==5312== HEAP SUMMARY:
==5312== in use at exit: 29,519 bytes in 86 blocks
==5312== total heap usage: 3,726 allocs, 3,640 frees, 489,389,315 bytes allocated
==5312==
==5312== 11 bytes in 1 blocks are still reachable in loss record 1 of 21
==5312== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5312== by 0x869B766: pa_xmalloc (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x869D9E8: ??? (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x86B00B7: pa_log_set_ident (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x86B02A5: ??? (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x86B0504: pa_log_levelv_meta (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x86B0397: pa_log_level_meta (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x86B3864: pa_mempool_new (in /usr/lib/x86_64-linux-gnu/libpulsecommon-1.1.so)
==5312== by 0x8249824: pa_context_new_with_proplist (in /usr/lib/x86_64-linux-gnu/libpulse.so.0.13.5)
==5312== by 0x803AA3B: ???
==5312== by 0x4E60EBC: ??? (in /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==5312== by 0x4E614C3: snd_config_searcha_hooks (in /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==5312==
........<cut out much of the output>........
==5312==
==5312== LEAK SUMMARY:
==5312== definitely lost: 0 bytes in 0 blocks
==5312== indirectly lost: 0 bytes in 0 blocks
==5312== possibly lost: 0 bytes in 0 blocks
==5312== still reachable: 29,519 bytes in 86 blocks
==5312== suppressed: 0 bytes in 0 blocks
==5312==
==5312== For counts of detected and suppressed errors, rerun with: -v
==5312== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)