File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
blog/content/second-edition/posts/11-allocator-designs Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -701,7 +701,7 @@ unsafe impl GlobalAlloc for Locked<LinkedListAllocator> {
701
701
unsafe fn alloc (& self , layout : Layout ) -> * mut u8 {
702
702
// perform layout adjustments
703
703
let (size , align ) = LinkedListAllocator :: size_align (layout );
704
- let mut allocator = self . inner . lock ();
704
+ let mut allocator = self . lock ();
705
705
706
706
if let Some ((region , alloc_start )) = allocator . find_region (size , align ) {
707
707
let alloc_end = alloc_start . checked_add (size ). expect (" overflow" );
@@ -719,7 +719,7 @@ unsafe impl GlobalAlloc for Locked<LinkedListAllocator> {
719
719
// perform layout adjustments
720
720
let (size , _ ) = LinkedListAllocator :: size_align (layout );
721
721
722
- self . inner . lock (). add_free_region (ptr as usize , size )
722
+ self . lock (). add_free_region (ptr as usize , size )
723
723
}
724
724
}
725
725
```
You can’t perform that action at this time.
0 commit comments