|
From: Jukka K. <muo...@ho...> - 2004-03-25 22:11:33
|
So this is what I tested:
#include <pthread.h>
#include <unistd.h>
void* handler (void *ptr)
{
return NULL;
}
int main()
{
pthread_t p;
pthread_create (&p, NULL, handler, NULL);
sleep (1);
return (0);
}
and I got this:
==6411== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==6411== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==6411== Using valgrind-2.0.0, a program supervision framework for
x86-linux.
==6411== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==6411== Estimated CPU clock rate is 1819 MHz
==6411== For more details, rerun with: -v
==6411==
==6411==
==6411== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==6411== malloc/free: in use at exit: 200 bytes in 1 blocks.
==6411== malloc/free: 3 allocs, 2 frees, 214 bytes allocated.
==6411== For counts of detected errors, rerun with: -v
==6411== searching for pointers to 1 not-freed blocks.
==6411== checked 4622480 bytes.
==6411==
==6411== LEAK SUMMARY:
==6411== definitely lost: 0 bytes in 0 blocks.
==6411== possibly lost: 0 bytes in 0 blocks.
==6411== still reachable: 0 bytes in 0 blocks.
==6411== suppressed: 200 bytes in 1 blocks.
==6411== Reachable blocks (those to which a pointer was found) are not
shown.
==6411== To see them, rerun with: --show-reachable=yes
==6411==
3 allocs and 2 frees? suppressed 200... ?
: JK
_________________________________________________________________
Nopea ja hauska tapa lähettää viestejä reaaliaikaisesti - MSN Messenger.
http://messenger.msn.fi Lataa nyt käyttöösi ilmaiseksi.
|
|
From: Joshua Moore-O. <jo...@ch...> - 2004-03-26 00:12:36
|
=46rom what I have heard the valgrind pthread library has a memory leak in =
it that's hard to fix so the error message has just been suppressed.
Joshua Moore-Oliva
On March 25, 2004 5:11 pm, Jukka Kuosmanen wrote:
> So this is what I tested:
>=20
> #include <pthread.h>
> #include <unistd.h>
>=20
> void* handler (void *ptr)
> {
> return NULL;
> }
>=20
> int main()
> {
> pthread_t p;
>=20
> pthread_create (&p, NULL, handler, NULL);
> sleep (1);
>=20
> return (0);
> }
>=20
> and I got this:
>=20
> =3D=3D6411=3D=3D Memcheck, a.k.a. Valgrind, a memory error detector for x=
86-linux.
> =3D=3D6411=3D=3D Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
> =3D=3D6411=3D=3D Using valgrind-2.0.0, a program supervision framework fo=
r=20
> x86-linux.
> =3D=3D6411=3D=3D Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
> =3D=3D6411=3D=3D Estimated CPU clock rate is 1819 MHz
> =3D=3D6411=3D=3D For more details, rerun with: -v
> =3D=3D6411=3D=3D
> =3D=3D6411=3D=3D
> =3D=3D6411=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 f=
rom 0)
> =3D=3D6411=3D=3D malloc/free: in use at exit: 200 bytes in 1 blocks.
> =3D=3D6411=3D=3D malloc/free: 3 allocs, 2 frees, 214 bytes allocated.
> =3D=3D6411=3D=3D For counts of detected errors, rerun with: -v
> =3D=3D6411=3D=3D searching for pointers to 1 not-freed blocks.
> =3D=3D6411=3D=3D checked 4622480 bytes.
> =3D=3D6411=3D=3D
> =3D=3D6411=3D=3D LEAK SUMMARY:
> =3D=3D6411=3D=3D definitely lost: 0 bytes in 0 blocks.
> =3D=3D6411=3D=3D possibly lost: 0 bytes in 0 blocks.
> =3D=3D6411=3D=3D still reachable: 0 bytes in 0 blocks.
> =3D=3D6411=3D=3D suppressed: 200 bytes in 1 blocks.
> =3D=3D6411=3D=3D Reachable blocks (those to which a pointer was found) ar=
e not=20
> shown.
> =3D=3D6411=3D=3D To see them, rerun with: --show-reachable=3Dyes
> =3D=3D6411=3D=3D
>=20
>=20
> 3 allocs and 2 frees? suppressed 200... ?
>=20
> : JK
>=20
> _________________________________________________________________
> Nopea ja hauska tapa l=E4hett=E4=E4 viestej=E4 reaaliaikaisesti - MSN Mes=
senger.=20
> http://messenger.msn.fi Lataa nyt k=E4ytt=F6=F6si ilmaiseksi.
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli=
ck
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>=20
|
|
From: Nicholas N. <nj...@ca...> - 2004-03-26 08:53:16
|
On Thu, 25 Mar 2004, Joshua Moore-Oliva wrote: > From what I have heard the valgrind pthread library has a memory leak in it that's hard to fix so the error message has just been suppressed. yes, sad but true... N |