pub fn count_thread_allocations_with_bytes<R>( f: impl FnOnce() -> R, ) -> (R, usize, usize)
Run f while counting successful heap allocation calls and bytes on the current thread. Restores previous state on unwind.
f