|
From: Patrice B. <pb_...@ya...> - 2007-12-06 19:02:28
|
Hello, =C2=A0 I ran into a similar issue few weeks ago. The problem was that I fo= rgot to=20 call pthread_join after a pthread_cancel, and then, some threads data were= =20 only freed at the end of the program and so, were not reported as non freed= =20 by valgrind. Taking a look at man pthread_join and man=20 pthread_attr_setdetachstate could help you. =C2=A0 =C2=A0 =C2=A0 =C2=A0Best regards. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Patrice Le Wednesday 05 December 2007 04:43:14 =E7=9F=B3=E5=BF=97=E5=BC=BA, vous av= ez =C3=A9crit=C2=A0: > valgrind-users=EF=BC=8C >=20 > i use the valgrind to check memory leak in multithread program, i find t= hat=20 the VIRT of the program increase to 2000M, but the valgrind can not provide= =20 any information of the memory leak, the following the the report: >=20 > =3D=3D9771=3D=3D LEAK SUMMARY: > =3D=3D9771=3D=3D definitely lost: 0 bytes in 0 blocks. > =3D=3D9771=3D=3D possibly lost: 6,196 bytes in 117 blocks. > =3D=3D9771=3D=3D still reachable: 869,504 bytes in 3,328 blocks. > =3D=3D9771=3D=3D suppressed: 0 bytes in 0 blocks. > =3D=3D9771=3D=3D Reachable blocks (those to which a pointer was found) ar= e not shown >=20 > =E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80s= zq...@is... > =E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80=E3=80=80= =E3=80=80=E3=80=802007-12-05 >=20 |