From 64dfd23f7bec9cb6591a39515cd9f85fa1a0cffa Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 23 Mar 2019 22:59:59 -0400 Subject: [PATCH] relabel purged slabs --- h_malloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/h_malloc.c b/h_malloc.c index 93e5f0b..7661073 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -689,6 +689,7 @@ static inline void deallocate_small(void *p, const size_t *expected_size) { if (c->empty_slabs_total + slab_size > max_empty_slabs_total) { if (!memory_map_fixed(slab, slab_size)) { + memory_set_name(slab, slab_size, size_class_labels[class]); enqueue_free_slab(c, metadata); mutex_unlock(&c->lock); return; @@ -1509,6 +1510,7 @@ EXPORT int h_malloc_trim(UNUSED size_t pad) { if (memory_map_fixed(slab, slab_size)) { break; } + memory_set_name(slab, slab_size, size_class_labels[class]); struct slab_metadata *trimmed = iterator; iterator = iterator->next;