More aggressive page purging

Mike Hommey mh+jemalloc at glandium.org
Thu May 10 02:51:24 PDT 2012


Hi,

madvise(MADV_FREE), on OSX, is not quite like madvise(MADV_DONTNEED) on
Linux: it doesn't actually do anything until the kernel really needs to
because of some memory pressure (or at least it looks like so). This
means that even when triggering an arenas.purge with mallctl, we can't
rely on the RSS value we get.

One way to make pages purging more aggressive is to use mmap(MAP_FIXED)
instead of madvise. As far as I can tell, it doesn't have an effect on
performance, at least not on Firefox.

Do you think we could reasonably switch pages_purge to use
mmap(MAP_FIXED) on OSX, or would you prefer a configure option?

Mike



More information about the jemalloc-discuss mailing list