Skip to content

Commit d08e3c2

Browse files
committed
style(mman): rename variables for clarity
1 parent 1cbf883 commit d08e3c2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/syscalls/mman.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,17 @@ pub extern "C" fn sys_munmap(ptr: *mut u8, size: usize) -> i32 {
7575
);
7676
debug!("Unmapping {virtual_address:X} ({size}) -> {physical_address:X}");
7777

78-
let range = PageRange::from_start_len(physical_address.as_u64() as usize, size).unwrap();
79-
if let Err(_err) = unsafe { PHYSICAL_FREE_LIST.lock().deallocate(range) } {
78+
let frame_range =
79+
PageRange::from_start_len(physical_address.as_u64() as usize, size).unwrap();
80+
if let Err(_err) = unsafe { PHYSICAL_FREE_LIST.lock().deallocate(frame_range) } {
8081
// FIXME: return EINVAL instead, once wasmtime can handle it
81-
error!("Unable to deallocate {range:?}");
82+
error!("Unable to deallocate {frame_range:?}");
8283
}
8384
}
8485

85-
let range = PageRange::from_start_len(virtual_address.as_usize(), size).unwrap();
86+
let page_range = PageRange::from_start_len(virtual_address.as_usize(), size).unwrap();
8687
unsafe {
87-
KERNEL_FREE_LIST.lock().deallocate(range).unwrap();
88+
KERNEL_FREE_LIST.lock().deallocate(page_range).unwrap();
8889
}
8990

9091
0

0 commit comments

Comments
 (0)