I am running memcheck using valgrind. the o/p is
==3091== 204 bytes in 17 blocks are definitely lost in loss record 1,406 of 2,299
what does it mean ?
What I guess there is 204 bytes memory loss
but what it meant by
17 blocks ?
and how to know how many time this memory leak happened by same function ?
Complete stack trace of the valgrind
==3091== 204 bytes in 17 blocks are definitely lost in loss record 1,406 of 2,299
==3091== at 0x4A05E1C: malloc (vg_replace_malloc.c:195)
==3091== by 0x4CA304: fs_get (fs_unix.c:38)
==3091== by 0x4E58C1: cpystr (misc.c:74)
==3091== by 0x4D130F: ip_nametoaddr (ip_unix.c:178)
==3091== by 0x4D15F4: tcp_open (tcp_unix.c:192)
==3091== by 0x4D41A5: cc_connect_http_proxy (proxy.c:164)
==3091== by 0x4D4B0C: cc_connect (proxy.c:571)
==3091== by 0x4D506D: ssl_open (osdep.c:353)
==3091== by 0x4E56C3: net_open_work (mail.c:6240)
==3091== by 0x4E558A: net_open (mail.c:6196)
==3091== by 0x4FBA04: imap_open (imap4r1.c:841)
==3091== by 0x4D9CB1: mail_open_work (mail.c:1355)
It means that there were 17 different calls to malloc
(or another allocator function) whose return was not free
'd. Those 17 allocations represented a total of 204 bytes being lost.