Memory problem with latest malloc.c

Joe Marcus Clarke marcus at
Wed Jan 2 22:15:45 PST 2008

On Wed, 2008-01-02 at 22:12 -0800, Jason Evans wrote:
> 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.

Yeah, I just realized that after looking at the memory usage of rev
1.154 (it's the same).  I could tweak kern.maxdsiz in loader.conf, but ~
1 GB is way too much memory for this program.  I know what causes the
extra memory usage, so I think I'll bug the Evolution guys.  Thanks.

> 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. =)

It may not be obvious to all users and I think many will be bit by this
(i.e. POLA violation) considering maxdsiz is 512 MB on i386.  Having DM
the default would be a good idea IMHO.


Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome at
FreeNode / #freebsd-gnome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url :

More information about the freebsd-current mailing list