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 {
4444
4545 /// Expands the available memory pool by adding one page.
4646 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 ( ) ;
5148 // SAFETY: The system page size, which is the layout size, cannot be 0
5249 let page_ptr = unsafe { alloc:: alloc ( page_layout) } ;
5350 // `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