freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Brian Bruns <camber AT ais.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: memory leaks
- Date: Thu, 18 May 2000 23:29:29 -0400 (EDT)
Disregard my question about sybase/sybase-ct I see it (sybase.c in the
msgs)...
This appears to only happen if a char or varchar column is in the select.
Off hand, I can't be sure whether this is a FreeTDS or a PHP problem...
sybase_fetch_object calls sybase_fetch_hash which has no calls to FreeTDS
at all. I'll verify this against Sybase's dblib tommorow morning
(hopefully). There is a call to MAKE_STD_ZVAL in sybase_fetch_hash which
is (apparently) causing the leak. I'm not exactly up to speed on the new
zend engine in php4, but this is where the allocation and initialization
of reference counting is done. Presumably sybase_free_result should clean
this up but doesn't !? Anyway, I'll know more tommorow when I test
against OpenClient.
A cursory look at the freetds code didn't turn up any obvious leaks.
Brian
On Thu, 18 May 2000, Wylie Swanson wrote:
> (2697)$ php -e sybase.html
> X-Powered-By: PHP/4.0RC2
> Content-type: text/html
>
> 1
> 1
> There were 8 rows.
> 9DE1BF94-1F0F-11D4-A7FF-0008C7C54186<br>
> 9DE1BF8F-1F0F-11D4-A7FF-0008C7C54186<br>
> 9DE1BF94-1F0F-11D4-A7FF-0008C7C54186<br>
> string.c(1658) : Freeing 0x081EE3A4 (83 bytes), script=sybase.html
> Last leak repeated 1 time
> sybase.c(934) : Freeing 0x081EDCFC (12 bytes), script=sybase.html
> Last leak repeated 1 time
>
>
> memory leaks? This is a simple (even lame :-) script: to test with. Any
> ideas, or
> is there any data I can help supplement to make this problem easier to fix?
>
> <?
>
> echo sybase_connect( "server", "user", "pwd" )."\n";
> echo sybase_select_db( "database" )."\n";
>
> $result=sybase_query( "SELECT * FROM table" );
> echo "There were ".sybase_num_rows($result)." rows.\n";
> while ($tst = sybase_fetch_object($result))
> {
> print $tst->f1."<br>\n";
> }
> $ok=sybase_free_result($result);
> $ok=sybase_close();
>
> ?>
>
>
> ---
> You are currently subscribed to freetds as: camber AT ais.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>
>
-
Re: memory leaks,
Wylie Swanson, 05/18/2000
- <Possible follow-up(s)>
- Re: memory leaks, Brian Bruns, 05/18/2000
- Re: memory leaks, Brian Bruns, 05/18/2000
- Re: memory leaks, Wylie Swanson, 05/19/2000
- Re: memory leaks, Wylie Swanson, 05/19/2000
Archive powered by MHonArc 2.6.24.