|
From: Brad H. <br...@fr...> - 2006-05-09 11:10:01
|
I'm trying to test QCA, and would like to know about blocks that are still= =20 reachable. However valgrind doesn't appear to be showing it to me: $ valgrind --show-reachable=3Dyes ./hexunittest =3D=3D12107=3D=3D Memcheck, a memory error detector. =3D=3D12107=3D=3D Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D12107=3D=3D Using LibVEX rev 1610, a library for dynamic binary trans= lation. =3D=3D12107=3D=3D Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. =3D=3D12107=3D=3D Using valgrind-3.2.0.SVN, a dynamic binary instrumentatio= n=20 framework. =3D=3D12107=3D=3D Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward = et al. =3D=3D12107=3D=3D For more details, rerun with: -v =3D=3D12107=3D=3D ********* Start testing of HexUnitTest ********* Config: Using QTest library 4.1.1, Qt 4.1.2 PASS : HexUnitTest::initTestCase() PASS : HexUnitTest::testHexString() PASS : HexUnitTest::testIncrementalUpdate() PASS : HexUnitTest::testBrokenInput() PASS : HexUnitTest::cleanupTestCase() Totals: 5 passed, 0 failed, 0 skipped ********* Finished testing of HexUnitTest ********* =3D=3D12107=3D=3D =3D=3D12107=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 24 f= rom 1) =3D=3D12107=3D=3D malloc/free: in use at exit: 36 bytes in 2 blocks. =3D=3D12107=3D=3D malloc/free: 3,192 allocs, 3,190 frees, 304,672 bytes all= ocated. =3D=3D12107=3D=3D For counts of detected errors, rerun with: -v =3D=3D12107=3D=3D searching for pointers to 2 not-freed blocks. =3D=3D12107=3D=3D checked 169,864 bytes. =3D=3D12107=3D=3D =3D=3D12107=3D=3D LEAK SUMMARY: =3D=3D12107=3D=3D definitely lost: 0 bytes in 0 blocks. =3D=3D12107=3D=3D possibly lost: 0 bytes in 0 blocks. =3D=3D12107=3D=3D still reachable: 36 bytes in 2 blocks. =3D=3D12107=3D=3D suppressed: 0 bytes in 0 blocks. There is nothing after that. Is this the correct behaviour? I was expecting= to=20 see my two blocks identified... Brad |
|
From: James B. <ja...@ha...> - 2006-05-09 11:29:36
|
On Tue, 2006-05-09 at 21:09 +1000, Brad Hards wrote: > I'm trying to test QCA, and would like to know about blocks that are still > reachable. However valgrind doesn't appear to be showing it to me: > > $ valgrind --show-reachable=yes ./hexunittest I think that you need the --leak-check=full option as well. Try valgrind --show-reachable=yes --leak-check=full ./hexunittest Cheers, James. James Begley -- Telephone +354-575-2030 Marine Research Institute, Skulagata 4, P.O. Box 1390, 121 Reykjavik, Iceland. |
|
From: Brad H. <br...@fr...> - 2006-05-09 11:45:36
|
On Tuesday 09 May 2006 21:29 pm, James Begley wrote: > On Tue, 2006-05-09 at 21:09 +1000, Brad Hards wrote: > > I'm trying to test QCA, and would like to know about blocks that are > > still reachable. However valgrind doesn't appear to be showing it to me: > > > > $ valgrind --show-reachable=yes ./hexunittest > > I think that you need the --leak-check=full option as well. Try > > valgrind --show-reachable=yes --leak-check=full ./hexunittest Ah, yes. Thanks very much - now works as expected. Brad |