From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 03:51:25 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBEAB106566B for ; Fri, 6 Mar 2009 03:51:25 +0000 (UTC) (envelope-from SRS0=zTVU56=7F=shell.siscom.net=vogelke@siscom.net) Received: from lamorack.siscom.net (lamorack.siscom.net [209.251.2.116]) by mx1.freebsd.org (Postfix) with ESMTP id 9DEA68FC2A for ; Fri, 6 Mar 2009 03:51:25 +0000 (UTC) (envelope-from SRS0=zTVU56=7F=shell.siscom.net=vogelke@siscom.net) Received: from shell.siscom.net ([209.251.2.80]) by lamorack.siscom.net with esmtp (Exim 4.62) (envelope-from ) id 1LfQhv-0004ku-Ok for freebsd-questions@freebsd.org; Thu, 05 Mar 2009 22:26:43 -0500 Received: by shell.siscom.net (Postfix, from userid 2198) id 8F7B5115529; Thu, 5 Mar 2009 22:26:43 -0500 (EST) Received: by kev.msw.wpafb.af.mil (Postfix, from userid 32768) id E0AB2B7C5; Thu, 5 Mar 2009 20:42:48 -0500 (EST) To: freebsd-questions@freebsd.org In-reply-to: <19C0CCFC-CBD5-4822-8838-4F10C4792C23@mac.com> (message from Andrew Moran on Mon, 02 Mar 2009 17:21:53 -0800) Organization: Oasis Systems Inc. X-Disclaimer: I don't speak for the USAF or Oasis. X-GPG-ID: 1024D/711752A0 2006-06-27 Karl Vogel X-GPG-Fingerprint: 56EB 6DBF 4224 C953 F417 CC99 4C7C 7D46 7117 52A0 Message-Id: <20090306014248.E0AB2B7C5@kev.msw.wpafb.af.mil> Date: Thu, 5 Mar 2009 20:42:48 -0500 (EST) From: vogelke+software@pobox.com (Karl Vogel) Subject: Re: SpamAssassin/Perl eating enormous amounts of memory? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vogelke+software@pobox.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 03:51:26 -0000 >> On Mon, 02 Mar 2009 17:21:53 -0800, >> Andrew Moran said: A> Thank you for your suggestion. I'll try compiling Perl and it's A> dependencies without using PERL_MALLOC. I've had similar memory problems using Hyperestraier to index collections exceeding 1,000,000 documents. The indexer would run without complaint under Solaris, but die periodically on FreeBSD with "out of memory" errors. Since I had around 6 Gb of RAM, I was pretty sure memory wasn't the problem, so I recompiled using a version of Doug Lea's malloc and the problem went away. The most recent malloc sources are here: ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.c ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.h Here's a Makefile suitable for building and installing the library with GCC. I'm sure the tabs have been mangled: CC = gcc CPLUS = g++ LIBS = libmalloc.a libcppmalloc.a DEST = /usr/local/lib INC = /usr/local/include all: $(LIBS) clean: rm -f $(LIBS) *.o cppmalloc.o: malloc.c $(CPLUS) -O -c -I. malloc.c -o cppmalloc.o install: $(LIBS) cp $(LIBS) $(DEST) cp -p malloc.h $(INC) ranlib $(DEST)/libcppmalloc.a ranlib $(DEST)/libmalloc.a libcppmalloc.a: cppmalloc.o rm -f libcppmalloc.a ar q libcppmalloc.a cppmalloc.o libmalloc.a: malloc.o rm -f libmalloc.a ar q libmalloc.a malloc.o malloc.o: malloc.c $(CC) -O -c -I. malloc.c To build something using configure and this library, change the configure commands to include these environment variables: LDFLAGS="-L/usr/local/lib -lmalloc" CPPFLAGS="-I/usr/local/include" -- Karl Vogel I don't speak for the USAF or my company Why are they called apartments, when they're all stuck together?