mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 05:33:06 +00:00
Reuse previously computed value
This commit is contained in:
@@ -121,9 +121,11 @@ zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size)
|
|||||||
static void
|
static void
|
||||||
zone_free_definite_size(malloc_zone_t *zone, void *ptr, size_t size)
|
zone_free_definite_size(malloc_zone_t *zone, void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
|
size_t alloc_size;
|
||||||
|
|
||||||
if (ivsalloc(ptr, config_prof) != 0) {
|
alloc_size = ivsalloc(ptr, config_prof);
|
||||||
assert(ivsalloc(ptr, config_prof) == size);
|
if (alloc_size != 0) {
|
||||||
|
assert(alloc_size == size);
|
||||||
je_free(ptr);
|
je_free(ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user