Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
i miss
> my $sth = $dbh->prepare($sql);
> $sth->execute ;
$sth->free
sorry wild guess am not into this code; however if you prepare a stmt
you should free it somewhere..
in informix check onstat -g ses <sid> if ralloc is big then it's likely
that you forget to free
prepped stmt's
one could run onstat -g stm <sid> if version > 9.2
to see which statements are all still there.
Superboer.
rkusenet schreef:
> Perl 5.6.1 on Linux.
>
> My colleague noticed this in Informix and I noticed it in Sybase.
>
> Here is the relevant code. I am writing this code off my hat
>
> sub memory_problem {
> my $sql = "SELECT * FROM SOME BIG TABLE" ;
> my $sth = $dbh->prepare($sql);
> $sth->execute ;
> my $rowdata = $sth->fetchall_arrayref ;
> }
>
> Now when this subroutine gets completed, we should expect
> all memory associated with variable $rowdata to be released, right?
> When I tested the program against Sybase, I saw the memory size
> of the program grow from 350K to 18M and then it remained at that,
> even when the subroutine was completed.
> The memory was never released until the program terminated.
>
> I tested this on Solaris 5.6 against Informix 9.21 by a perl 5.6.0
> program and the behaviour is same.
>
> This behaviour is not what I understand of perl garbage collection.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.