Re: Big memory leak in division operator example !

new topic     » goto parent     » topic index » view thread      » older message » newer message

now with this command line:


$ valgrind --show-reachable=yes --leak-check=yes exu test-memory-leak2.exu 
==13748== Memcheck, a memory error detector.
==13748== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==13748== Using LibVEX rev 1658, a library for dynamic binary translation.
==13748== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==13748== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation
framework.
==13748== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==13748== For more details, rerun with: -v
==13748== 
No memory leak till now !!!
starting division...
Look at the memory leak now !!!!
finished...
==13748== 
==13748== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 from 1)
==13748== malloc/free: in use at exit: 119,365 bytes in 2,719 blocks.
==13748== malloc/free: 10,156 allocs, 7,437 frees, 543,167 bytes allocated.
==13748== For counts of detected errors, rerun with: -v
==13748== searching for pointers to 2,719 not-freed blocks.
==13748== checked 338,024 bytes.
==13748== 
==13748== 8 bytes in 1 blocks are still reachable in loss record 1 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8089B9A: be_init (be_main.c:175)
==13748== 
==13748== 
==13748== 8 bytes in 1 blocks are definitely lost in loss record 2 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8085025: eu_startup (be_runtime.c:3624)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 12 bytes in 1 blocks are still reachable in loss record 3 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8083C1F: shift_args (be_runtime.c:4272)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 23 bytes in 1 blocks are still reachable in loss record 4 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8089C52: be_init (be_main.c:187)
==13748== 
==13748== 
==13748== 48 bytes in 4 blocks are definitely lost in loss record 5 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808C07E: Dminus (be_inline.c:46)
==13748== 
==13748== 
==13748== 100 bytes in 1 blocks are still reachable in loss record 6 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808B2F4: InitTraceWindow (be_rterror.c:222)
==13748== 
==13748== 
==13748== 100 bytes in 1 blocks are still reachable in loss record 7 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808F44E: InitTask (be_task.c:242)
==13748== 
==13748== 
==13748== 100 bytes in 1 blocks are definitely lost in loss record 8 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808F44E: InitTask (be_task.c:242)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 120 bytes in 10 blocks are still reachable in loss record 9 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8089DEE: tmp_alloc (be_alloc.c:155)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 168 bytes in 14 blocks are definitely lost in loss record 10 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808BFC6: NewDouble (be_inline.c:46)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 228 bytes in 5 blocks are still reachable in loss record 11 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8089CFA: NewS1 (be_alloc.c:752)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 372 bytes in 31 blocks are still reachable in loss record 12 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808C07E: Dminus (be_inline.c:46)
==13748== 
==13748== 
==13748== 800 bytes in 1 blocks are still reachable in loss record 13 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x807D736: InitStack (be_execute.c:693)
==13748== 
==13748== 
==13748== 1,932 bytes in 6 blocks are definitely lost in loss record 14 of 19
==13748==    at 0x402071B: realloc (vg_replace_malloc.c:306)
==13748==    by 0x8085F3D: Append (be_runtime.c:689)
==13748== 
==13748== 
==13748== 7,800 bytes in 49 blocks are possibly lost in loss record 15 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808D99B: machine (be_machine.c:2523)
==13748== 
==13748== 
==13748== 10,704 bytes in 892 blocks are still reachable in loss record 16 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808BFFE: Dadd (be_inline.c:46)
==13748== 
==13748== 
==13748== 13,236 bytes in 1,103 blocks are still reachable in loss record 17 of
19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808BFC6: NewDouble (be_inline.c:46)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 35,830 bytes in 60 blocks are still reachable in loss record 18 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x808D99B: machine (be_machine.c:2523)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== 
==13748== 47,776 bytes in 537 blocks are definitely lost in loss record 19 of 19
==13748==    at 0x4020620: malloc (vg_replace_malloc.c:149)
==13748==    by 0x8089CFA: NewS1 (be_alloc.c:752)
==13748==    by 0x8049050: (within /home/mingo/euphoria/bin/exu)
==13748== 
==13748== LEAK SUMMARY:
==13748==    definitely lost: 50,032 bytes in 563 blocks.
==13748==      possibly lost: 7,800 bytes in 49 blocks.
==13748==    still reachable: 61,533 bytes in 2,107 blocks.
==13748==         suppressed: 0 bytes in 0 blocks.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu