diff options
| author | Dmitry-Me <wipedout@yandex.ru> | 2015-11-12 11:59:29 (GMT) |
|---|---|---|
| committer | Jason Evans <je@fb.com> | 2015-11-12 18:45:49 (GMT) |
| commit | ea59ebf4d3c2a5749e170cc45c294e04129e5b49 (patch) | |
| tree | 2502c5bc8580dc66f3a679ef93797825fdf4ed15 /src | |
| parent | f4a0f32d340985de477bbe329ecdaecd69ed1055 (diff) | |
| download | jemalloc-ea59ebf4d3c2a5749e170cc45c294e04129e5b49.zip jemalloc-ea59ebf4d3c2a5749e170cc45c294e04129e5b49.tar.gz jemalloc-ea59ebf4d3c2a5749e170cc45c294e04129e5b49.tar.bz2 | |
Reuse previously computed value
Diffstat (limited to 'src')
| -rw-r--r-- | src/zone.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -121,9 +121,11 @@ zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size) static void zone_free_definite_size(malloc_zone_t *zone, void *ptr, size_t size) { + size_t alloc_size; - if (ivsalloc(ptr, config_prof) != 0) { - assert(ivsalloc(ptr, config_prof) == size); + alloc_size = ivsalloc(ptr, config_prof); + if (alloc_size != 0) { + assert(alloc_size == size); je_free(ptr); return; } |
