(&self, ptr: *mut u8)
| 591 | } |
| 592 | |
| 593 | fn on_dealloc(&self, ptr: *mut u8) { |
| 594 | if ptr.is_null() { |
| 595 | return; |
| 596 | } |
| 597 | let Some(_guard) = ReentryGuard::enter() else { |
| 598 | return; |
| 599 | }; |
| 600 | if self.remove_allocation(ptr as usize) { |
| 601 | self.sampled_dealloc_events.fetch_add(1, Ordering::Relaxed); |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | fn on_realloc(&self, old_ptr: *mut u8, new_ptr: *mut u8, usable_bytes: usize) { |
| 606 | if new_ptr.is_null() { |
no test coverage detected