relabel purged slabs

This commit is contained in:
Daniel Micay 2019-03-23 22:59:59 -04:00
parent 178ec6e3f9
commit 64dfd23f7b

View File

@ -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;