[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Memory problems in OO context



On Thu, 18 Nov 1999 01:34:09 -0600 (CST), Matthew Langford wrote:

>To get the whole deal I had to use more than 55 MB of memory.  (I think
>this is what I came back to; for a while I had to crank out some virtual
>memory and set it higher.)  The hash, after I finally got it, takes up 4.6
>MB. If I read in the file, I don't have too many memory problems.  
>Clearly, there are serious memory leaks here in the "getting" stage.

That doesn't prove a thing. I tried HTML::TreeBuilder on a 15k HTML
file, on a PC (DOS Perl), and I got an out of memory error, with many
megabytes available for Perl.

This HTML parsing seems to be very memory hungry. My guess is that this
is because every HTML tag is a not so small object in memory. A lot of
those objects, and you're quickly out of memory.

Just give an acceptable proof that there IS indeed a memory leak, e.g.
by parsing the same file over and over again, clearing memory (=
releasing objects) every time, and watching it get out of memory after
many loops.

-- 
	Bart.

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org