richb@sunaus.oz (Rich Burridge) (07/18/88)
Faces is a visual monitor for mail and print jobs that has just been released to comp.sources.misc. It was released at patchlevel 2, so this is the first official patch since then. It fixes a memory leakage problem. Faces still leaks memory, and eventually will fill up your virtual memory. The leakage is caused by the pr_destroy not destroying everything that the mem_create created. I spent the whole weekend looking at this, and at alternate ways of trying to do this, and have not come up with anything totally satisfactory. If anybody comes up with a decent solution, I'd be very pleased to hear from them. Apply this patch using Larry Walls' patch program, or as it's an easy one, you might wish to apply by hand. Recompile and reinstall. Rich. --------------------------------------------------------------------- This is official patch #3 for faces v1.1, please apply it. It fixes the following problem: 1. Faces was grabbing more and more memory each time it ran. This was due to incorrect list chaining in do_mail. Rich. *** original/mon.c Thu Jul 14 11:54:38 1988 --- mon.c Sat Jul 16 14:26:36 1988 *************** *** 73,82 **** return ; } ! while (recs != NULL) { ! recs->total = 0 ; /* Zeroise this records total message count. */ ! recs = recs->next ; /* Point to next record. */ } if ((fp = fopen(spoolfile,"r")) == NULL) /* Open spoolfile. */ --- 73,83 ---- return ; } ! crec = recs ; ! while (crec != NULL) { ! crec->total = 0 ; /* Zeroise this records total message count. */ ! crec = crec->next ; /* Point to next record. */ } if ((fp = fopen(spoolfile,"r")) == NULL) /* Open spoolfile. */ *************** *** 108,113 **** --- 109,115 ---- else if ((crec = rec_exists(host,user)) != NULL) { STRCPY(crec->ts, ts) ; + if (!crec->total) noicons++ ; crec->total++ ; } else *** original/patchlevel.h Thu Jul 14 11:54:18 1988 --- patchlevel.h Sat Jul 16 14:38:08 1988 *************** *** 16,19 **** * reported to me then an attempt will be made to fix them. */ ! #define PATCHLEVEL 2 --- 16,19 ---- * reported to me then an attempt will be made to fix them. */ ! #define PATCHLEVEL 3