The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with memory leak kshk123 HP-UX 1 01-22-2008 06:46 AM
memory leak problem sonali High Level Programming 4 10-12-2006 07:29 AM
Memory leak of fork() whererush High Level Programming 7 05-11-2006 08:51 AM
about virtual memory and memory leak shriashishpatil High Level Programming 4 02-20-2006 08:31 AM
memory leak? lenna IP Networking 1 07-16-2005 01:29 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-12-2007
mindTeaser's Avatar
Registered User
 

Join Date: Oct 2007
Location: Ahamedabad City, India
Posts: 1
Question Memory leak in pthread

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

Last edited by mindTeaser; 10-12-2007 at 02:42 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 10-12-2007
Registered User
 

Join Date: Mar 2006
Location: Ahmedabad
Posts: 120
Look for upgrade availability

Look RedHat upgrade site if there is glibc upgrade available
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0