Date: Thu, 5 Mar 2009 20:42:48 -0500 (EST) From: vogelke+software@pobox.com (Karl Vogel) To: freebsd-questions@freebsd.org Subject: Re: SpamAssassin/Perl eating enormous amounts of memory? Message-ID: <20090306014248.E0AB2B7C5@kev.msw.wpafb.af.mil> In-Reply-To: <19C0CCFC-CBD5-4822-8838-4F10C4792C23@mac.com> (message from Andrew Moran on Mon, 02 Mar 2009 17:21:53 -0800)
next in thread | previous in thread | raw e-mail | index | archive | help
>> On Mon, 02 Mar 2009 17:21:53 -0800, >> Andrew Moran <sneepre@mac.com> 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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090306014248.E0AB2B7C5>