Fix huge_ralloc to maintain chunk statistics.

Fix huge_ralloc() to properly maintain chunk statistics when using
mremap(2).
This commit is contained in:
Jason Evans
2011-11-11 14:41:59 -08:00
parent fa351d9fdc
commit 12a4887826
4 changed files with 17 additions and 14 deletions

View File

@@ -569,7 +569,7 @@ arena_chunk_dealloc(arena_t *arena, arena_chunk_t *chunk)
arena->ndirty -= spare->ndirty;
}
malloc_mutex_unlock(&arena->lock);
chunk_dealloc((void *)spare, chunksize);
chunk_dealloc((void *)spare, chunksize, true);
malloc_mutex_lock(&arena->lock);
#ifdef JEMALLOC_STATS
arena->stats.mapped -= chunksize;