[Bug fortran/59589] Memory leak when deallocating polymorphic
anlauf at gmx dot de
gcc-bugzilla@gcc.gnu.org
Tue Dec 24 12:23:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59589
Harald Anlauf <anlauf at gmx dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gmx dot de
--- Comment #6 from Harald Anlauf <anlauf at gmx dot de> ---
(In reply to Dominique d'Humieres from comment #4)
> On x86_64-apple-darwin10.8, gcc version 4.8.2, with the call system line
> commented, valgrind gives:
>
> ==42524== HEAP SUMMARY:
> ==42524== in use at exit: 88 bytes in 1 blocks
> ==42524== total heap usage: 37 allocs, 36 frees, 400,004,301 bytes
> allocated
> ==42524==
> ==42524== LEAK SUMMARY:
> ==42524== definitely lost: 0 bytes in 0 blocks
> ==42524== indirectly lost: 0 bytes in 0 blocks
> ==42524== possibly lost: 0 bytes in 0 blocks
> ==42524== still reachable: 0 bytes in 0 blocks
> ==42524== suppressed: 88 bytes in 1 blocks
> ==42524==
> ==42524== For counts of detected and suppressed errors, rerun with: -v
> ==42524== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
>
> (I don't have valgrind for darwin13).
On i686-pc-linux-gnu, 4.9.0, and reducing the array size by 1/10, I get:
==31916== HEAP SUMMARY:
==31916== in use at exit: 40,000,000 bytes in 10 blocks
==31916== total heap usage: 61 allocs, 51 frees, 40,007,249 bytes allocated
==31916==
==31916== 4,000,000 bytes in 1 blocks are possibly lost in loss record 1 of 2
==31916== at 0x402913D: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==31916== by 0x8049F45: main (test_leak.f90:24)
==31916==
==31916== 36,000,000 bytes in 9 blocks are definitely lost in loss record 2 of
2
==31916== at 0x402913D: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==31916== by 0x8049F45: main (test_leak.f90:24)
==31916==
==31916== LEAK SUMMARY:
==31916== definitely lost: 36,000,000 bytes in 9 blocks
==31916== indirectly lost: 0 bytes in 0 blocks
==31916== possibly lost: 4,000,000 bytes in 1 blocks
==31916== still reachable: 0 bytes in 0 blocks
==31916== suppressed: 0 bytes in 0 blocks
More information about the Gcc-bugs
mailing list