We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 195776a commit b56289eCopy full SHA for b56289e
src/alloc/isolated_alloc.rs
@@ -68,8 +68,7 @@ impl IsolatedAlloc {
68
fn huge_normalized_layout(layout: Layout, page_size: usize) -> Layout {
69
// Allocate in page-sized chunks
70
let size = layout.size().next_multiple_of(page_size);
71
- // Align probably *shouldn't* ever be greater than the page size,
72
- // but just in case
+ // And make sure the align is at least one page
73
let align = std::cmp::max(layout.align(), page_size);
74
Layout::from_size_align(size, align).unwrap()
75
}
0 commit comments