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

Method alloc

zeroize/tests/alloc.rs:19–21  ·  view source on GitHub ↗
(&self, layout: Layout)

Source from the content-addressed store, hash-verified

17#[allow(clippy::undocumented_unsafe_blocks)]
18unsafe impl GlobalAlloc for ProxyAllocator {
19 unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
20 unsafe { System.alloc(layout) }
21 }
22
23 unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
24 if ptr == REG_PTR.load(Relaxed) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected