diff options
author | Jason Evans <jasone@canonware.com> | 2016-06-01 20:14:18 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-06-06 03:42:24 (GMT) |
commit | 03eea4fb8b464ff399ef3118207feb6b376ceded (patch) | |
tree | 82ecf625d9164d75acbc47263299b87f97b0a953 /include/jemalloc/internal/jemalloc_internal.h.in | |
parent | 22588dda6e09f63246064e2e692dc0dded2e8e35 (diff) | |
download | jemalloc-03eea4fb8b464ff399ef3118207feb6b376ceded.zip jemalloc-03eea4fb8b464ff399ef3118207feb6b376ceded.tar.gz jemalloc-03eea4fb8b464ff399ef3118207feb6b376ceded.tar.bz2 |
Better document --enable-ivsalloc.
Diffstat (limited to 'include/jemalloc/internal/jemalloc_internal.h.in')
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal.h.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal.h.in b/include/jemalloc/internal/jemalloc_internal.h.in index fb3991b..243aae6 100644 --- a/include/jemalloc/internal/jemalloc_internal.h.in +++ b/include/jemalloc/internal/jemalloc_internal.h.in @@ -1061,12 +1061,19 @@ ivsalloc(tsdn_t *tsdn, const void *ptr) { extent_t *extent; - /* Return 0 if ptr is not within a chunk managed by jemalloc. */ + /* + * Return 0 if ptr is not within an extent managed by jemalloc. This + * function has two extra costs relative to isalloc(): + * - The extent_lookup() call cannot claim to be a dependent lookup, + * which induces rtree lookup load dependencies. + * - The lookup may fail, so there is an extra branch to check for + * failure. + * */ extent = extent_lookup(tsdn, ptr, false); if (extent == NULL) return (0); assert(extent_active_get(extent)); - /* Only arena chunks should be looked up via interior pointers. */ + /* Only slab members should be looked up via interior pointers. */ assert(extent_addr_get(extent) == ptr || extent_slab_get(extent)); return (isalloc(tsdn, extent, ptr)); |