File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,7 @@ impl IsolatedAlloc {
44
44
45
45
/// Expands the available memory pool by adding one page.
46
46
fn add_page ( & mut self ) -> ( * mut u8 , & mut DenseBitSet < usize > ) {
47
- // SAFETY: the system page size must always be a power of 2 and nonzero,
48
- // and cannot overflow an isize on the host.
49
- let page_layout =
50
- unsafe { Layout :: from_size_align_unchecked ( self . page_size , self . page_size ) } ;
47
+ let page_layout = Layout :: from_size_align ( self . page_size , self . page_size ) . unwrap ( ) ;
51
48
// SAFETY: The system page size, which is the layout size, cannot be 0
52
49
let page_ptr = unsafe { alloc:: alloc ( page_layout) } ;
53
50
// `page_infos` has to have one bit for each `COMPRESSION_FACTOR`-sized chunk of bytes in the page.
You can’t perform that action at this time.
0 commit comments