diff options
author | Mike Hommey <mh@glandium.org> | 2012-04-18 16:29:43 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2012-04-19 01:57:48 (GMT) |
commit | 666c5bf7a8baaa842da69cb402948411432a9d00 (patch) | |
tree | e1297a397d99a6fa3b0cc7813ced7d8d169e241e /src/arena.c | |
parent | e38e45743fd283ae90986c2c728607e9eb12676d (diff) | |
download | jemalloc-666c5bf7a8baaa842da69cb402948411432a9d00.zip jemalloc-666c5bf7a8baaa842da69cb402948411432a9d00.tar.gz jemalloc-666c5bf7a8baaa842da69cb402948411432a9d00.tar.bz2 |
Add a pages_purge function to wrap madvise(JEMALLOC_MADV_PURGE) calls
This will be used to implement the feature on mingw, which doesn't have
madvise.
Diffstat (limited to 'src/arena.c')
-rw-r--r-- | src/arena.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arena.c b/src/arena.c index 0f15562..ed47824 100644 --- a/src/arena.c +++ b/src/arena.c @@ -676,8 +676,8 @@ arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk) if (config_debug) ndirty -= npages; - madvise((void *)((uintptr_t)chunk + (pageind << LG_PAGE)), - (npages << LG_PAGE), JEMALLOC_MADV_PURGE); + pages_purge((void *)((uintptr_t)chunk + (pageind << LG_PAGE)), + (npages << LG_PAGE)); if (config_stats) nmadvise++; } |