[Mimedefang] memory leak?

David F. Skoll dfs at roaringpenguin.com
Wed Feb 11 08:18:48 EST 2004


On Wed, 11 Feb 2004, Jonas Eckerman wrote:

> With most soplutions using an embedded perl interpreter, the perl
> interpreter is never unlodaded. This means that if the perl
> interpreter itself has memory leaks, those can accumulate over time.

Correct.  But read the multiplexor source code to see how we defend against
this.

Basically, the "master" process loads mimedefang.pl and initializes the
filter.  It then never calls any Perl functions again; all Perl execution
happens in slaves (which get killed off periodically.)  So I can't see
how Perl can leak memory in the master.

> It can also accumulate failures of the garbage collector. Perls
> garbage collector sometimes fails in freeing all the memory allocated
> by a perl script (usually because of cyclic references). This memory
> is freed when the perl interpreter finishes instead. If it never
> finishes, leaks can be accumulated.

And if you follow the "perlembed" man page to destroy the interpreter, it works
fine on Linux and segfaults on Solaris. :-(

Perl is a mess, let's face it.

Regards,

David.



More information about the MIMEDefang mailing list