felixfung/skippy-xd

Memory leak

Closed this issue · 0 comments

Pragmatically, probably not that important...

Valgrind output:

==22880== HEAP SUMMARY:
==22880==     in use at exit: 445,117 bytes in 13,048 blocks
==22880==   total heap usage: 469,526 allocs, 456,478 frees, 63,675,419 bytes allocated
==22880== 
==22880== 24 bytes in 1 blocks are definitely lost in loss record 46 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x118030: dlist_add (dlist.c:47)
==22880==    by 0x118030: dlist_find_all (dlist.c:456)
==22880==    by 0x10DC4A: daemon_count_clients (skippy.c:482)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 168 (24 direct, 144 indirect) bytes in 1 blocks are definitely lost in loss record 164 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x118030: dlist_add (dlist.c:47)
==22880==    by 0x118030: dlist_find_all (dlist.c:456)
==22880==    by 0x10DBDE: daemon_count_clients (skippy.c:472)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 288 (144 direct, 144 indirect) bytes in 6 blocks are definitely lost in loss record 186 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117765: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x115833: wm_get_stack_sub (wm.c:351)
==22880==    by 0x115833: wm_get_stack (wm.c:404)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x112E80: skippy_activate (skippy.c:882)
==22880==    by 0x112E80: mainloop (skippy.c:1026)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 336 (168 direct, 168 indirect) bytes in 7 blocks are definitely lost in loss record 187 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117765: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x112E80: skippy_activate (skippy.c:882)
==22880==    by 0x112E80: mainloop (skippy.c:1026)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 384 (192 direct, 192 indirect) bytes in 8 blocks are definitely lost in loss record 189 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117789: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x10D394: main (skippy.c:2150)
==22880== 
==22880== 384 (192 direct, 192 indirect) bytes in 8 blocks are definitely lost in loss record 190 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117765: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x115833: wm_get_stack_sub (wm.c:351)
==22880==    by 0x115833: wm_get_stack (wm.c:404)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 612 (512 direct, 100 indirect) bytes in 2 blocks are definitely lost in loss record 208 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x4DFB055: FcPatternObjectInsertElt (fcpat.c:525)
==22880==    by 0x4DFF4E0: FcPatternObjectAddWithBinding (fcpat.c:711)
==22880==    by 0x4E0D249: UnknownInlinedFun (fcpat.c:1258)
==22880==    by 0x4E0D249: UnknownInlinedFun (fcxml.c:3112)
==22880==    by 0x4E0D249: FcEndElement (fcxml.c:3237)
==22880==    by 0x4F306B5: doContent (xmlparse.c:3124)
==22880==    by 0x4F2D423: UnknownInlinedFun (xmlparse.c:2689)
==22880==    by 0x4F2D423: doProlog (xmlparse.c:4972)
==22880==    by 0x4F2F84C: prologProcessor (xmlparse.c:4675)
==22880==    by 0x4F27267: callProcessor (xmlparse.c:1029)
==22880==    by 0x4F33848: XML_ParseBuffer (xmlparse.c:2071)
==22880==    by 0x4E079F7: FcConfigParseAndLoadFromMemoryInternal.lto_priv.0 (fcxml.c:3547)
==22880==    by 0x4E0836E: _FcConfigParse.lto_priv.0 (fcxml.c:3682)
==22880==    by 0x4E08598: UnknownInlinedFun (fcxml.c:3450)
==22880==    by 0x4E08598: _FcConfigParse.lto_priv.0 (fcxml.c:3641)
==22880== 
==22880== 1,152 (576 direct, 576 indirect) bytes in 24 blocks are definitely lost in loss record 239 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117789: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x115833: wm_get_stack_sub (wm.c:351)
==22880==    by 0x115833: wm_get_stack (wm.c:404)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 1,584 (792 direct, 792 indirect) bytes in 33 blocks are definitely lost in loss record 260 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117789: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x112E80: skippy_activate (skippy.c:882)
==22880==    by 0x112E80: mainloop (skippy.c:1026)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 2,544 (1,272 direct, 1,272 indirect) bytes in 53 blocks are definitely lost in loss record 285 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117765: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 3,552 (1,776 direct, 1,776 indirect) bytes in 74 blocks are definitely lost in loss record 292 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117789: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x115833: wm_get_stack_sub (wm.c:351)
==22880==    by 0x115833: wm_get_stack (wm.c:404)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x112E80: skippy_activate (skippy.c:882)
==22880==    by 0x112E80: mainloop (skippy.c:1026)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== 11,280 (5,616 direct, 5,664 indirect) bytes in 234 blocks are definitely lost in loss record 325 of 329
==22880==    at 0x4843788: malloc (vg_replace_malloc.c:442)
==22880==    by 0x117789: dlist_add (dlist.c:47)
==22880==    by 0x114D41: wm_find_client (wm.c:311)
==22880==    by 0x114D41: wm_get_stack_sub.part.0 (wm.c:374)
==22880==    by 0x10DA96: update_clients (skippy.c:414)
==22880==    by 0x10DA96: daemon_count_clients (skippy.c:466)
==22880==    by 0x1132FC: mainloop (skippy.c:1253)
==22880==    by 0x10D3C8: main (skippy.c:2157)
==22880== 
==22880== LEAK SUMMARY:
==22880==    definitely lost: 11,288 bytes in 451 blocks
==22880==    indirectly lost: 11,020 bytes in 459 blocks
==22880==      possibly lost: 0 bytes in 0 blocks
==22880==    still reachable: 422,809 bytes in 12,138 blocks
==22880==         suppressed: 0 bytes in 0 blocks
==22880== Reachable blocks (those to which a pointer was found) are not shown.
==22880== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==22880== 
==22880== Use --track-origins=yes to see where uninitialised values come from
==22880== For lists of detected and suppressed errors, rerun with: -s
==22880== ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0)