MCPcopy Create free account
hub / github.com/RustCrypto/utils / dealloc

Method dealloc

zeroize/tests/alloc.rs:16–25  ·  view source on GitHub ↗
(&self, ptr: *mut u8, layout: Layout)

Source from the content-addressed store, hash-verified

14 }
15
16 unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
17 if layout.size() == 160 {
18 for i in 0..layout.size() {
19 let b = unsafe { core::ptr::read(ptr.add(i)) };
20 assert_eq!(b, 0);
21 }
22 }
23
24 unsafe { System.dealloc(ptr, layout) }
25 }
26}
27
28#[global_allocator]

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected