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 9028dfa commit d51d7ccCopy full SHA for d51d7cc
src/alloc/isolated_alloc.rs
@@ -233,9 +233,7 @@ impl IsolatedAlloc {
233
// FIXME: this can lead to threshold effects, we should probably add some form
234
// of hysteresis.
235
if pinfo.is_empty() {
236
- // SAFETY: `self.page_size` is always a power of 2 and does not overflow an isize
237
- let page_layout =
238
- unsafe { Layout::from_size_align_unchecked(self.page_size, self.page_size) };
+ let page_layout = Layout::from_size_align(self.page_size, self.page_size).unwrap();
239
self.page_infos.remove(idx_of_pinfo);
240
// SAFETY: We checked that there are no outstanding allocations
241
// from us pointing to this page, and we know it was allocated
0 commit comments