[tpop3d-discuss] possible memory leak with Perl authentication

Chris Lightfoot chris at ex-parrot.com
Sat, 8 Dec 2001 02:49:42 +0000


On Fri, Dec 07, 2001 at 09:32:30PM -0600, Christopher E. Stith wrote:
> I think I've figured something out, playing with my Perl code and
> applying Mr. Lightfoot's suggestions.
> 
> Thus spake Chris Lightfoot (chris@ex-parrot.com):
> 
> > On Fri, Dec 07, 2001 at 05:40:14PM -0600, Christopher E. Stith wrote:
> > > I've recently installed tpop3d with a custom Perl authenticator
> > > for my virtual domain POP3 server. It works rather well, but I
> > > have a memory concern.
> > > 
> > > When the process starts, it's around 2.3 megs. After four days, it
> > > was about 5.6 megs. It starts going up in 4k chunks every five to
> 
> [snip]
> 
> 4k is about the size Perl allocates when it needs more filehandles and
> all the data it keeps with those. I know this from a server project I
> worked on some time ago. I'm opening files from within the Perl code,
> and I had forgotten to close them anywhere. Now they are being closed
> after use.
    [...]
> I wouldn't expect that, but again I think this isn't the C code,
> but rather a Perl issue, and in this case my Perl issue especially.

Well, if this fixes it, jolly good....


If your auth-perl authenticator is likely to be of general
interest, I would appreciate it if you would contribute it
as an example for the tpop3d distribution. (For anyone
else on the list, I'd also appreciate some non-perl
auth-other examples, assuming anybody has written any....)

> Did I mention before that I absolutely _love_ tpop3d? I was afraid I'd
> have to get out my K&R or Soustroup to customize a POP3 server to this
> site's needs. It's your work, Chris, that's letting the rest of us off
> easy. Thanks for releasing tpop3d under the GNU GPL. I, for one, really
> appreciate it. From the looks of the list archives, I'm far from the only
> one.

Thanks. I'm glad you like it and find it useful.

-- 
 Any design problem can be solved by adding a level of indirection,
 apart from having too many levels of indirection. (Cargill)