[m-dev.] boehm gc USE_MUNMAP

Peter Wang novalazy at gmail.com
Fri Jan 18 14:36:22 AEDT 2008


Hi,

We're seeing (probably) heap fragmentation leading to unexpectedly large
heaps for a particular application.  Following the Boehm GC
documentation, I linked it against a copy of libgc built with the
USE_MUNMAP option which lets it return unused pages to the OS.
It solved the problem with that application.

The following speed test on saturn shows a ~20% slow down with this
option, so I assume we wouldn't want it on by default.  However, we
could add it as a new grade component, say gc_unmap.  I think it would
be generally useful.

Peter


EXTRA_MCFLAGS = 
mercury_compile.01 25.176u 0.373s 0:25.57 99.8% 0+0k 0+0io 0pf+0w
mercury_compile.01 25.183u 0.366s 0:25.55 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.01 25.218u 0.359s 0:25.59 99.8% 0+0k 0+0io 0pf+0w
mercury_compile.01 25.249u 0.366s 0:25.63 99.8% 0+0k 0+0io 0pf+0w
mercury_compile.01 25.182u 0.295s 0:25.48 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.01 25.185u 0.306s 0:25.49 99.9% 0+0k 0+0io 0pf+0w
EXTRA_MCFLAGS = 
BOEHM_CFLAGS += -DUSE_MMAP -DUSE_MUNMAP
mercury_compile.02 29.901u 0.418s 0:30.32 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.02 30.221u 0.431s 0:30.65 100.0%        0+0k 0+0io 0pf+0w
mercury_compile.02 29.840u 0.442s 0:30.29 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.02 29.885u 0.404s 0:30.29 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.02 29.906u 0.474s 0:30.38 99.9% 0+0k 0+0io 0pf+0w
mercury_compile.02 29.969u 0.452s 0:30.42 99.9% 0+0k 0+0io 0pf+0w

EXTRA_MCFLAGS = 
mercury_compile.01 average of 6 with ignore=1     25.19

EXTRA_MCFLAGS = 
BOEHM_CFLAGS += -DUSE_MMAP -DUSE_MUNMAP
mercury_compile.02 average of 6 with ignore=1     29.92


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list