|
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.
|