Skip to content

Commit

Permalink
Fix: unmap temp page again to enable multiple bss-like sections
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Feb 16, 2024
1 parent f317b0d commit 949a297
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/page_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub(crate) fn map_segment(
unsafe {
map_page(
temp_page.clone(),
new_frame.clone(),
new_frame,
page_table_flags,
page_table,
frame_allocator,
Expand Down Expand Up @@ -152,6 +152,11 @@ pub(crate) fn map_segment(
});
}

// unmap temp page again
let (new_frame, flusher) = page_table.unmap(temp_page).unwrap();
flusher.flush();

// map last page to new frame
unsafe {
map_page(
last_page,
Expand Down

0 comments on commit 949a297

Please sign in to comment.