add sampling for guarded objects

This commit is contained in:
daanx
2024-11-17 00:06:16 -08:00
parent 8b6017d976
commit 8ba1879073
10 changed files with 75 additions and 11 deletions

View File

@@ -668,6 +668,7 @@ mi_decl_restrict void* _mi_heap_malloc_guarded(mi_heap_t* heap, size_t size, boo
if (p != NULL) {
if (!mi_heap_is_initialized(heap)) { heap = mi_prim_get_default_heap(); }
mi_heap_stat_increase(heap, malloc, mi_usable_size(p));
mi_heap_stat_counter_increase(heap, guarded_alloc_count, 1);
}
#endif
#if MI_DEBUG>3