tpop3d-devel
[Top][All Lists]
Advanced

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

Re: [tpop3d-discuss] Apparent memory leak in 1.4.1pre4 under Solaris 8


From: Chris Lightfoot
Subject: Re: [tpop3d-discuss] Apparent memory leak in 1.4.1pre4 under Solaris 8
Date: Mon, 18 Mar 2002 23:00:15 +0000
User-agent: Mutt/1.3.24i

On Mon, Mar 18, 2002 at 01:44:04PM +0000, John P Connor wrote:
> I'm using a auth-perl under Solaris 8 with perl 5.6.1 and have a memory 
> leak. I initially thought it was my code, loosely based on the oraclevmail 

Oops. This one is quite embarrassing:

diff -u -r1.12 stringmap.c
--- stringmap.c 2002/02/09 13:39:48     1.12
+++ stringmap.c 2002/03/18 22:54:42
@@ -47,8 +47,8 @@
  * they are pointers to memory allocated by xmalloc(3). */
 void stringmap_delete_free(stringmap S) {
     if (!S) return;
-    if (S->l) stringmap_delete(S->l);
-    if (S->g) stringmap_delete(S->g);
+    if (S->l) stringmap_delete_free(S->l);
+    if (S->g) stringmap_delete_free(S->g);
 
     xfree(S->key);
     xfree(S->d.v);

However, you may find that tpop3d/auth-perl leaks memory
even with this installed. This is a consequence of perl's
crummy garbage collection, and there's nothing tpop3d can
do about it, except perhaps restart the embedded perl
interpreter every so often. I'm not sure how serious a
problem this is on production systems.

-- 
 ``We will also be working with the victims and perpetrators of crime...''
 (Labour party campaign leaflet)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]