File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: ptr;
2
2
use crate :: sys_common:: alloc:: { MIN_ALIGN , realloc_fallback} ;
3
3
use crate :: alloc:: { GlobalAlloc , Layout , System } ;
4
- use crate :: mem;
5
4
6
5
#[ stable( feature = "alloc_system_type" , since = "1.28.0" ) ]
7
6
unsafe impl GlobalAlloc for System {
@@ -88,7 +87,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
88
87
let mut out = ptr:: null_mut ( ) ;
89
88
// posix_memalign requires that the alignment be a multiple of `sizeof(void*)`.
90
89
// Since these are all powers of 2, we can just use max.
91
- let align = layout. align ( ) . max ( mem:: size_of :: < usize > ( ) ) ;
90
+ let align = layout. align ( ) . max ( crate :: mem:: size_of :: < usize > ( ) ) ;
92
91
let ret = libc:: posix_memalign ( & mut out, align, layout. size ( ) ) ;
93
92
if ret != 0 {
94
93
ptr:: null_mut ( )
You can’t perform that action at this time.
0 commit comments