
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Re: tlug-digest Digest V2004 #194
On Fri, 30 Jul 2004, Botond Botyanszki wrote:
> Yeah, when you write a perl script that runs and finishes in a few
> minutes, that might be true.
> I had to code a pretty complex perl program that handles a couple GB of
> data a day and has to be running constantly. The memory usage increases
> about 20MB per day. I don't know wheter the garbage collector in perl is
> sploppy, or one of the perl libs that use C code is leaking memory, or I
> made something silly that perl doesn't like. Anyway, I passed on the task
> of debugging this issue to someone else, I'd rather debug a C program ;)
The way the garbage collector works in PERL (reference
count) it won't free struct that refers to itself, and also
-- if a root object never goes out of scope, it never get's
GC'ed. And PERL has a debug interface for finding problems
like this that 99% of us never use. Like any computer
language, the more the language does for you, the harder it
is to figure out how it's doing it and how to debug it.
C++ doesn't have any built-in mechanism for killing core
leaks and Java's GC -- while both more sophisticated and
slower than PERL's also has it's own problems.
That said, core leaks in a C program aren't necessarily easy
to find either. As with PERL (or java or C++) no one puts a
core leak into a program on purpose. The more skilled among
us can make 'em almost impossible to find :)
Steve S.
Home |
Main Index |
Thread Index