Remove unused counters

This commit is contained in:
Sergiy Kuryata 2025-01-07 09:06:56 -08:00
parent ad18e02994
commit 5e16662cd4
3 changed files with 0 additions and 21 deletions

View file

@ -39,8 +39,6 @@ extern inline void* _mi_page_malloc_zero(mi_heap_t* heap, mi_page_t* page, size_
// pop from the free list
page->free = mi_block_next(page, block);
page->used++;
mi_page_queue_t* pq = mi_heap_page_queue_of(heap, page);
mi_allocation_stats_increment(page->block_size);
mi_assert_internal(page->free == NULL || _mi_ptr_page(page->free) == page);

View file

@ -780,7 +780,6 @@ mi_page_kind_t mi_page_kind_from_size(size_t block_size)
return kind;
}
void mi_allocation_stats_large_bin_increment(size_t block_size);
static mi_page_t* mi_find_free_page_from_large_bin(mi_heap_t* heap, mi_page_queue_t* pq);
// Find a page with free blocks of `page->block_size`.
@ -854,7 +853,6 @@ static mi_page_t* mi_page_queue_find_free_ex(mi_heap_t* heap, mi_page_queue_t* p
// Try using a page from a large bind (the next size bin) before allocating a new page
page = mi_find_free_page_from_large_bin(heap, pq);
if (page != NULL) {
mi_allocation_stats_large_bin_increment(pq->block_size);
return page;
}
}

View file

@ -146,23 +146,6 @@ void mi_allocation_stats_decrement(size_t block_size)
#endif
}
mi_partitioned_counter_t _mi_allocated_from_large_bin[MI_BIN_FULL+1];
void mi_allocation_stats_large_bin_increment(size_t block_size)
{
#ifdef MI_ENABLE_DETAILED_ALOC_COUNTERS
uint8_t binIndex = mi_counter_index_from_block_size(block_size);
mi_partitioned_counter_increment(&_mi_allocated_from_large_bin[binIndex], 1);
#endif
}
void mi_update_allocated_memory_stats_large_bins(mi_allocation_counter_t* allocation_counter, int counter_count)
{
for (int i = 0; i < counter_count; i++) {
allocation_counter[i].counter = mi_partitioned_counter_get_value(&_mi_allocated_from_large_bin[i]);
}
}
size_t _mi_arena_segment_abandoned_free_space_stats_next(mi_arena_field_cursor_t* previous);
void mi_segment_update_free_space_stats(mi_allocation_counter_t* free_space_in_segments)
{