|
From: arryoo h. <the...@gm...> - 2008-10-10 02:08:33
|
hi,
Here the problem.
$ valgrind --tool=memcheck --trace-children=yes --error-limit=no
--leak-check=full --log-file=leak_hxx ./hxx
the content of leak_hxx is not so much as expected. And I am sure
there are memory problems in the program.
program hxx, pthread_create() a lot of threads ( about 50 ). There is
a thread listen on socket 0.0.0.0:2000,
and many of threads are created when receive a socket connect.
$ ./hxx
$ netstat
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN
this is fine. But call like
$ valgrind --tool=memcheck --trace-children=yes --error-limit=no
--leak-check=full --log-file=leak_hxx ./hxx
$ netstat -na | grep 2000
$
there is nothing.
It seems that the listener thread haven't be created. Is there any bug
in valgrind mentioned previously about pthread_create
or socket?
regards
---
BTW, send your dulplicate reply to me. thanks.
|