Memory problem with latest malloc.c
Jason Evans
jasone at freebsd.org
Wed Jan 2 22:12:03 PST 2008
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
More information about the freebsd-current
mailing list