SpamAssassin/Perl eating enormous amounts of memory?
Karl Vogel
vogelke+software at pobox.com
Thu Mar 5 19:51:26 PST 2009
>> On Mon, 02 Mar 2009 17:21:53 -0800,
>> Andrew Moran <sneepre at 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?
More information about the freebsd-questions
mailing list