Something is seriously wrong with --disable-munmap (default on linux)

Mike Hommey mh+jemalloc at glandium.org
Wed May 9 15:46:55 PDT 2012


On Wed, May 09, 2012 at 03:00:11PM -0700, Jason Evans wrote:
> On May 9, 2012, at 11:21 AM, Jason Evans wrote:
> > On May 9, 2012, at 6:32 AM, Mike Hommey wrote:
> >> Something is seriously wrong with --disable-munmap. What I see in
> >> Firefox is that it seems free chunks are never reused, or seldomly: I
> >> end up with a process sucking gigabytes of mapped memory, while jemalloc
> >> claims it mapped 500M. On 32-bits system, that exhausts the address
> >> space.
> > 
> > I saw the same thing yesterday on a 64-bit system, though the application was at 729 GiB of virtual memory use and climbing…  I'm looking into this problem more today.
> 
> I found and fixed two problems, one of which was Windows-specific:
> 
> 	http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git;a=commitdiff;h=de6fbdb72c6e1401b36f8f2073404645bac6cd2b
> 	http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git;a=commitdiff;h=374d26a43bcceb12eb56ed7cc47815d7f933901c
> 
> This likely fixes all the virtual memory leaks, but more testing is warranted.

The first one matches what I was seeing when tracking chunk allocation
under a debugger on Windows.
The second one matches what I was seeing on Linux.

Hopefully, this will fix all my current problems. I'm sending that
version of jemalloc to test and will have results tomorrow.

Thanks.

Mike

PS: FWIW, the last unapplied patches I have are "Remove -fno-common
compiler flag for OS X" and "Export je_memalign and je_valloc".



More information about the jemalloc-discuss mailing list