Re: memory leaks from calls to opendir and fopen

"Nathan Falk" <[email protected]> Thu, 25 Jul 2002 16:47:37 -0400
Newsgroups gmane.linux.ngpt.user
Message-ID <[email protected]>
The patch solves the problem of opendir() but fopen() still grows the
program.  statvfs(), also, but that doesn't have a complementary call like
closedir() or fclose(), so I'm not sure what's going wrong there.  The test
program I previously provided can be easily modified to demonstrate these
remaining leaks.

Regards,

Nate Falk
RS/6000 SP Workload Management/LoadLeveler
845-433-8162 (T/L: 293-8162)



|---------+-------------------------------------------------->
|         |           Saurabh Desai/Austin/IBM@IBMUS         |
|         |           Sent by:                               |
|         |           [email protected].|
|         |           usf.ibm.com                            |
|         |                                                  |
|         |                                                  |
|         |           07/24/2002 08:17 PM                    |
|         |                                                  |
|---------+-------------------------------------------------->
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       Nathan Falk/Poughkeepsie/IBM@IBMUS                                           |
  |       cc:       [email protected]                                 |
  |       Subject:  Re: [pthreads-users] memory leaks from calls to opendir and fopen            |
  |                                                                                              |
  |                                                                                              |
  >----------------------------------------------------------------------------------------------|






The pthread mutex created by certain glibc functions didn't get freed
properly
by ngpt and that causes memory leaks.  Here is a patch for ngpt-2.0.0
release
to fix this problem. Thank you for providing a testcase and reporting this
bug.

(See attached file: ngpt-2.0.0-1.diff)

Thanks,
- - - - -
Saurabh Desai
POSIX Threading for Linux
IBM  Linux Technology Center
e-mail: [email protected] OR [email protected]
phone: 512-838-2655, T/L: 678-2655
http://oss.software.ibm.com/developerworks/opensource/pthreads



#### ngpt-2.0.0-1.diff has been removed from this note on July 25 2002 by
Nathan Falk