Skip to content

Commit 949a297

Browse files
committed
Fix: unmap temp page again to enable multiple bss-like sections
1 parent f317b0d commit 949a297

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/page_table.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub(crate) fn map_segment(
124124
unsafe {
125125
map_page(
126126
temp_page.clone(),
127-
new_frame.clone(),
127+
new_frame,
128128
page_table_flags,
129129
page_table,
130130
frame_allocator,
@@ -152,6 +152,11 @@ pub(crate) fn map_segment(
152152
});
153153
}
154154

155+
// unmap temp page again
156+
let (new_frame, flusher) = page_table.unmap(temp_page).unwrap();
157+
flusher.flush();
158+
159+
// map last page to new frame
155160
unsafe {
156161
map_page(
157162
last_page,

0 commit comments

Comments
 (0)