mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 17:17:19 +03:00
parent
8413463f3a
commit
b2c0d6322d
33 changed files with 2118 additions and 1302 deletions
|
|
@ -56,7 +56,7 @@ zone_size(malloc_zone_t *zone, void *ptr)
|
|||
* not work in practice, we must check all pointers to assure that they
|
||||
* reside within a mapped chunk before determining size.
|
||||
*/
|
||||
return (ivsalloc(ptr, config_prof));
|
||||
return (ivsalloc(tsd_fetch(), ptr, config_prof));
|
||||
}
|
||||
|
||||
static void *
|
||||
|
|
@ -87,7 +87,7 @@ static void
|
|||
zone_free(malloc_zone_t *zone, void *ptr)
|
||||
{
|
||||
|
||||
if (ivsalloc(ptr, config_prof) != 0) {
|
||||
if (ivsalloc(tsd_fetch(), ptr, config_prof) != 0) {
|
||||
je_free(ptr);
|
||||
return;
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ static void *
|
|||
zone_realloc(malloc_zone_t *zone, void *ptr, size_t size)
|
||||
{
|
||||
|
||||
if (ivsalloc(ptr, config_prof) != 0)
|
||||
if (ivsalloc(tsd_fetch(), ptr, config_prof) != 0)
|
||||
return (je_realloc(ptr, size));
|
||||
|
||||
return (realloc(ptr, size));
|
||||
|
|
@ -123,7 +123,7 @@ zone_free_definite_size(malloc_zone_t *zone, void *ptr, size_t size)
|
|||
{
|
||||
size_t alloc_size;
|
||||
|
||||
alloc_size = ivsalloc(ptr, config_prof);
|
||||
alloc_size = ivsalloc(tsd_fetch(), ptr, config_prof);
|
||||
if (alloc_size != 0) {
|
||||
assert(alloc_size == size);
|
||||
je_free(ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue