diff --git a/src/allocator/linked_list.rs b/src/allocator/linked_list.rs index 3753511e1..a03b6f347 100644 --- a/src/allocator/linked_list.rs +++ b/src/allocator/linked_list.rs @@ -122,7 +122,7 @@ unsafe impl GlobalAlloc for Locked { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { // perform layout adjustments let (size, align) = LinkedListAllocator::size_align(layout); - let mut allocator = self.inner.lock(); + let mut allocator = self.lock(); if let Some((region, alloc_start)) = allocator.find_region(size, align) { let alloc_end = alloc_start.checked_add(size).expect("overflow"); @@ -140,6 +140,6 @@ unsafe impl GlobalAlloc for Locked { // perform layout adjustments let (size, _) = LinkedListAllocator::size_align(layout); - self.inner.lock().add_free_region(ptr as usize, size) + self.lock().add_free_region(ptr as usize, size) } }