Don't purge junk filled chunks when shrinking huge allocations

When junk filling is enabled, shrinking an allocation fills the bytes
that were previously allocated but now aren't. Purging the chunk before
doing that is just a waste of time.

This resolves #260.
This commit is contained in:
Mike Hommey
2015-08-28 13:45:51 +09:00
committed by Jason Evans
parent 6d8075f1e6
commit 4a2a3c9a6e
2 changed files with 12 additions and 6 deletions

View File

@@ -1,5 +1,9 @@
#include "test/jemalloc_test.h"
#ifdef JEMALLOC_FILL
const char *malloc_conf = "junk:false";
#endif
static chunk_hooks_t orig_hooks;
static chunk_hooks_t old_hooks;