mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-18 08:31:46 +03:00
Better document --enable-ivsalloc.
This commit is contained in:
parent
22588dda6e
commit
03eea4fb8b
3 changed files with 14 additions and 6 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@
|
|||
|
||||
/*
|
||||
* JEMALLOC_IVSALLOC enables ivsalloc(), which verifies that pointers reside
|
||||
* within jemalloc-owned chunks before dereferencing them.
|
||||
* within jemalloc-owned extents before dereferencing them.
|
||||
*/
|
||||
#undef JEMALLOC_IVSALLOC
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue