Restore --enable-ivsalloc.

However, unlike before it was removed do not force --enable-ivsalloc
when Darwin zone allocator integration is enabled, since the zone
allocator code uses ivsalloc() regardless of whether
malloc_usable_size() and sallocx() do.

This resolves #211.
This commit is contained in:
Jason Evans
2015-03-18 21:06:58 -07:00
parent 8d6a3e8321
commit e0a08a1496
6 changed files with 43 additions and 5 deletions

View File

@@ -2306,7 +2306,7 @@ je_sallocx(const void *ptr, int flags)
assert(malloc_initialized() || IS_INITIALIZER);
malloc_thread_init();
if (config_debug)
if (config_ivsalloc)
usize = ivsalloc(ptr, config_prof);
else
usize = isalloc(ptr, config_prof);
@@ -2434,7 +2434,7 @@ je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)
assert(malloc_initialized() || IS_INITIALIZER);
malloc_thread_init();
if (config_debug)
if (config_ivsalloc)
ret = ivsalloc(ptr, config_prof);
else
ret = (ptr == NULL) ? 0 : isalloc(ptr, config_prof);