Add extent_destroy_t and use it during arena destruction.

Add the extent_destroy_t extent destruction hook to extent_hooks_t, and
use it during arena destruction.  This hook explicitly communicates to
the callee that the extent must be destroyed or tracked for later reuse,
lest it be permanently leaked.  Prior to this change, retained extents
could unintentionally be leaked if extent retention was enabled.

This resolves #560.
This commit is contained in:
Jason Evans 2017-04-27 15:51:35 -07:00
parent b9ab04a191
commit c86c8f4ffb
10 changed files with 120 additions and 17 deletions

View file

@ -1086,7 +1086,7 @@ if test "x${maps_coalesce}" = "x1" ; then
AC_DEFINE([JEMALLOC_MAPS_COALESCE], [ ])
fi
dnl Indicate whether to retain memory (rather than using) munmap()) by default.
dnl Indicate whether to retain memory (rather than using munmap()) by default.
if test "x$default_retain" = "x1" ; then
AC_DEFINE([JEMALLOC_RETAIN], [ ])
fi