mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 17:17:19 +03:00
Use huge size class infrastructure for large size classes.
This commit is contained in:
parent
b46261d58b
commit
ed2c2427a7
34 changed files with 463 additions and 1979 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(tsdn_fetch(), ptr, config_prof));
|
||||
return (ivsalloc(tsdn_fetch(), ptr));
|
||||
}
|
||||
|
||||
static void *
|
||||
|
|
@ -87,7 +87,7 @@ static void
|
|||
zone_free(malloc_zone_t *zone, void *ptr)
|
||||
{
|
||||
|
||||
if (ivsalloc(tsdn_fetch(), ptr, config_prof) != 0) {
|
||||
if (ivsalloc(tsdn_fetch(), ptr) != 0) {
|
||||
je_free(ptr);
|
||||
return;
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ static void *
|
|||
zone_realloc(malloc_zone_t *zone, void *ptr, size_t size)
|
||||
{
|
||||
|
||||
if (ivsalloc(tsdn_fetch(), ptr, config_prof) != 0)
|
||||
if (ivsalloc(tsdn_fetch(), ptr) != 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(tsdn_fetch(), ptr, config_prof);
|
||||
alloc_size = ivsalloc(tsdn_fetch(), ptr);
|
||||
if (alloc_size != 0) {
|
||||
assert(alloc_size == size);
|
||||
je_free(ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue