helo frnds,
I am using
RHEL5 and C lang for development.
I am getting some memory leak problem in pthread.
I hav developed a program which creates two threads for listening purpose on two diff ports. both the child threads are doing same job but on diff port no.
I am using pthread_create(), pthread_join() and pthread_kill() thread routines in my program. and wen I checked my program using valgrind tool it gives me some memory leak.
The memory leak occures in libpthread.
so is there any routine to cleanup the thread memory [eg. like pthread_destory()]
following are some lines of out put of valgrind
Quote:
==============================================================
272 bytes in 2 blocks are possibly lost in loss record 5 of 7
at 0x40046FF: calloc (vg_replace_malloc.c:279)
by 0x446479E9: _dl_allocate_tls (in /lib/ld-2.5.so)
by 0x447C79D6: pthread_create@@GLIBC_2.1 (in /lib/libpthread-2.5.so)
by 0x80488BD: main (sigThread.c:50)
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks.
possibly lost: 272 bytes in 2 blocks.
still reachable: 1,928 bytes in 6 blocks.
suppressed: 0 bytes in 0 blocks.
Reachable blocks (those to which a pointer was found) are not shown.
To see them, rerun with: --show-reachable=yes
==============================================================