Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

(tye)Re: eval + no warnings = no memory

by tye (Sage)
on Jan 30, 2001 at 07:16 UTC ( #55166=note: print w/replies, xml ) Need Help??


in reply to eval + no warnings = no memory

Temporary "scratchpad" variables are not free()d until (roughly) the end of the statement. This statement never ends so each eval allocates a bit of temporary space and these never get free()d.

You can test this by making the loop only repeat a few hundred times and then put that in a bigger loop and see the memory grow initially but then level out as the hundreds of temporaries get free()d each time around the bigger loop.

But I haven't tested this theory, it just seems pretty danged likely. (:

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: eval + no warnings = no memory

Replies are listed 'Best First'.
Re: (tye)Re: eval + no warnings = no memory
by gryng (Hermit) on Jan 30, 2001 at 09:48 UTC
    I reduced the program to the smallest size, but I can assure you that the behavior happens even if the eval statement is within a loop, or even within a procedure called by a loop (as this was the original case).

    But it's a good guess though :)

    Ciao,
    Gryn

      Ah, thanks for the info. From elsewhere in this thread, it sounds like the leak is in "stringy" eval for some versions of Perl on some platforms. I'm sure the porters would appreciate a bug report with the data collected so far. (:

              - tye (but my friends call me "Tye")
        One of the benefits of perlmonks is that I can turn to you all for this sort of information: Where do you report bugs?

        Ciao,
        Gryn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-09-20 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?