(&self, layout: Layout)
| 62 | unsafe impl<A: Allocator> Allocator for MetricsAlloc<'_, A> { |
| 63 | #[inline] |
| 64 | fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> { |
| 65 | let ptr = self.allocator.allocate(layout)?; |
| 66 | self.metrics.mark_external_allocation(layout.size()); |
| 67 | Ok(ptr) |
| 68 | } |
| 69 | |
| 70 | #[inline] |
| 71 | unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) { |
nothing calls this directly
no test coverage detected