Re: Memory problem with latest malloc.c

From: Jason Evans <jasone_at_freebsd.org>
Date: Wed, 02 Jan 2008 22:12:06 -0800
Joe Marcus Clarke wrote:
> On Wed, 2008-01-02 at 18:26 -0800, Jason Evans wrote:
>> It would be really helpful to me if you run your program with 
>> MALLOC_OPTIONS=dM and monitor memory usage.  These flags cause mmap to 
>> be used instead of sbrk, and we can find out from that how much memory 
>> you really need.  If peak memory usage is substantially different when 
>> using mmap versus sbrk, there's probably a malloc bug.
> 
> Memory climbed up to 976 MB SZ, 974 MB RSS MB with dM
> -> /etc/malloc.conf.  The file was eventually generated without error.
> Again, with Aj -> /etc/malloc.conf, the python2.5 process operating on
> the same file planed out at 504 MB SZ, 501 MB RSS.

Okay, that indicates that there is not a problem with malloc; you're 
running into the data segment resource limit.  It isn't possible to 
increase the data segment beyond 512 MB on i386, so your best bet is to 
use MALLOC_OPTIONS=DM for the memory-intensive program.  That will cause 
the program use all available space in the data segment, then start 
using mmap as necessary.

I'm sorta thinking that MALLOC_OPTIONS=DM should be the default.  Robert 
Watson is the person who talked me into this change, so feel free to 
give him a hard time about the extra configuration you have to do in 
order to get work done. =)

Thanks,
Jason
Received on Thu Jan 03 2008 - 05:12:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:24 UTC