jemalloc/jemalloc — pull request #109 by thestinger (2014-08-28 22:29:03+00:00)
Title: add support for sized deallocation

This adds a new `dallocx_sz` function to the external API, allowing the
size to be passed by the caller. It avoids some extra reads in the
thread cache fast path. In the case where stats are enabled, this avoids
the work of calculating the size from the pointer.

An assertion validates the size that's passed in, so enabling debugging
will allow users of the API to debug cases where an incorrect size is
passed in.

The performance win for a contrived microbenchmark doing an allocation
and immediately freeing it is ~1-5%. It may have a different impact on a
real workload.

Closes #28