[freetds] Memory leak or memory accumulation with freetds-0.82 ctlib's ct_cmd_alloc / ct_cmd_drop?

mtbrown88 at comcast.net mtbrown88 at comcast.net
Thu Nov 27 12:01:56 EST 2008



Hi freddy77, 



Thanks for testing it.  I am running Red Hat Enterprise Linux 4 Update 7 -- uname -a output: 

   Linux devbox.localdomain 2.6.9-78 EL #1 Wed Jul 9 15:27:01 EDT 2008 i686 athlon i386 GNU/Linux 

and top shows all of the memory slowly being used up. 



Thanks, 

mtbrown88 


----- Original Message ----- 
From: "Frediano Ziglio" <freddy77 at gmail.com> 
To: "FreeTDS Development Group" <freetds at lists.ibiblio.org> 
Sent: Thursday, November 27, 2008 7:42:19 AM GMT -05:00 US/Canada Eastern 
Subject: Re: [freetds] Memory leak or memory accumulation with freetds-0.82 ctlib's ct_cmd_alloc / ct_cmd_drop? 

2008/11/26  <mtbrown88 at comcast.net>: 
> 
> 
> Hi all, 
> 
> 
> 
> Is there a known memory leak or memory accumulation issue with ct_cmd_alloc / ct_cmd_drop? 
> 
> 
> 
> I'm writing a program to poll a database as regular intervals and it gradually accumulates memory (seen via top). 
> 
> 
> 
> Below is source code to attempt and isolate the problem, compiled with the following command: 
> 
>    cc -o ctlib_leak ctlib_leak.c /usr/local/lib/libct.a /usr/lib/librt.a 
> 
> 
> 
> I am linking with the archive libraries to run against Purify if necessary. 
> 
> 
> Quickest way to see memory eaten up (via top) is to direct stdout and stderr to /dev/null (so output doesn't slow down processing). 
> 
> 
> 
> Thanks in advance for any input or suggestions.  I can dig deeper, but wanted to know if this is a known issue. 
> 
> 
> 
> Regards, Michael 
> 
> 
> 
> 
> 
> Here is the source code for ctlib_leak.c: 
> 

... code stripped down ... 

Hi, 
  I ran the program (it compile fine without problems, I just changed 
server, port and account) with Valgrind under Linux using all protocol 
(4.2, 5.0, 7.0 and 8.0) with different server but I got no leaks. 
Which platform are you using? Which configurations? 

freddy77 
_______________________________________________ 
FreeTDS mailing list 
FreeTDS at lists.ibiblio.org 
http://lists.ibiblio.org/mailman/listinfo/freetds 



More information about the FreeTDS mailing list