MCPcopy Create free account
hub / github.com/Craig-Macomber/lol_alloc / alloc

Method alloc

lol_alloc/src/locked_allocator.rs:17–19  ·  view source on GitHub ↗
(&self, layout: Layout)

Source from the content-addressed store, hash-verified

15
16unsafe impl<T: GlobalAlloc> GlobalAlloc for LockedAllocator<T> {
17 unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
18 self.spin.lock().alloc(layout)
19 }
20
21 unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
22 self.spin.lock().dealloc(ptr, layout);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected