Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: 5.6->5.8 Analysis

by doorslam (Beadle)
on Jul 11, 2003 at 15:42 UTC ( [id://273416]=note: print w/replies, xml ) Need Help??


in reply to Re: 5.6->5.8 Analysis
in thread 5.6->5.8 Analysis

Sorry, forgot to log on before posting my question.

Perl is v5.8.0.
DBD::Oracle::VERSION = '1.14'

I'm mainly looking for something that will just scan the calls and print out a report, just so I have a list of candidates to narrow down my search as to what's broken, like:
'open' behavior has changed, IO internals have been modified
etc.

pseudocode:

open(INF,"<$filename") || die "Couldn't open in file\n"; my $id = 0; my $data = ""; ... my $statement = $dbh->prepare("insert into data_table values(:1,:2)"); while(<INF>) { if (s/^ID:[\s]+//g) { $id = lc($_); } elsif (s/^Data:[\s]+//g) { $data = lc($_); } #repeat for several labels $statement->execute($id,$data); $id = 0; $data = ""; }

There's several pieces of data that get pulled out and and compared to the data that exists in the table for a given ID, but this should give an idea of what it's doing.

As far as Devel::Leak, no haven't used it before. Will investigate.

I'll try and break down the code to demonstrate the leak, but I have to figure out for certain what's causing it first.

Replies are listed 'Best First'.
Re^3: 5.6->5.8 Analysis
by PotPieMan (Hermit) on Jul 13, 2003 at 14:58 UTC
    I seriously doubt that this would cause a memory leak, but that code sample suggests that $id and $data aren't needed outside the while loop. I always try to put variables in the innermost scope that they are needed.

    --PotPieMan

      I'd have thought so too, but the program hangs on one record, and I can bring up top and watch the process start eating memory until the machine hangs.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://273416]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found