MCPcopy Create free account
hub / github.com/Windfisch/rust-assert-no-alloc / alloc

Method alloc

src/lib.rs:140–143  ·  view source on GitHub ↗
(&self, layout: Layout)

Source from the content-addressed store, hash-verified

138#[cfg(not(all(feature = "disable_release", not(debug_assertions))))] // if not disabled
139unsafe impl GlobalAlloc for AllocDisabler {
140 unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
141 self.check(layout);
142 System.alloc(layout)
143 }
144
145 unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
146 self.check(layout);

Callers

nothing calls this directly

Calls 1

checkMethod · 0.80

Tested by

no test coverage detected