procmail
[Top] [All Lists]

Re: procmail memory consumption

1998-09-02 15:15:06
Procmail uses realloc() a *lot*. Some Unix systems (especially BSD-derived
ones, like FreeBSD and NetBSD) fail to reuse dynamically allocated memory
regions that are freed up when realloc() is used repeatedly. This is not the
fault of procmail, despite what certain FreeBSD kernel programmers think. :-)
However, a patch for procmail does exist which works around the problem with
realloc() that some systems have by having procmail dynamically allocate
memory in much larger chunks. You can find that patch at
<http://www.xray.mpe.mpg.de/mailing-lists/procmail/1997-10/msg00347.html>.
Perhaps this patch can help you with your problem?

Thanks Ed!  You hit it right on the nail.  IBM does have a patch in
the pipeline that should address it.  I just checked today and the fix
is not out yet.  I am going to re-compile procmail with the patch you
cited.

I've cc'd this to the procmail list too.  Hope you don't mind.  Maybe
someone else can benefit from it.

Thanks,
-bob

+--------------------------------------------------------------------+
Section B: PE APARs                    Total PE APARs this period: 3
--------------------
APAR NUMBER: IX81399            RESOLVED AS: PROGRAM ERROR

***************************************************************
*USERS AFFECTED:                                              *
* All users with the following filesets at   these levels   *
*   bos.rte.libc 4.2.1.11expand the size of very large
*   bos.rte.libc 4.2.1.12 calling realloc or (2) freeing a
***************************************************************
*PROBLEM DESCRIPTION:                                         *
*  In some cases, memory allocation routines (malloc,
*  calloc, realloc) do not reuse freed memory as
*  efficiently as possible. This generally only creates
*  a problem for applications that repetitively
*  dynamically expand the size of very large structures
*  (either by (1) calling realloc or (2) freeing a chunk
*  of memory then calling malloc/calloc to expand it).
***************************************************************
*RECOMMENDATION:                                              *
*  Apply apar IX81399
***************************************************************

<Prev in Thread] Current Thread [Next in Thread>