@@ -213,7 +213,7 @@ where
213
213
let mem_size = segment. mem_size ( ) ;
214
214
let file_size = segment. file_size ( ) ;
215
215
216
- // calculate virual memory region that must be zeroed
216
+ // calculate virtual memory region that must be zeroed
217
217
let zero_start = virt_start_addr + file_size;
218
218
let zero_end = virt_start_addr + mem_size;
219
219
@@ -297,7 +297,7 @@ where
297
297
///
298
298
/// Panics if a page is not mapped in `self.page_table`.
299
299
fn copy_from ( & self , addr : VirtAddr , buf : & mut [ u8 ] ) {
300
- // We can't know for sure that contigous virtual address are contigous
300
+ // We can't know for sure that contiguous virtual address are contiguous
301
301
// in physical memory, so we iterate of the pages spanning the
302
302
// addresses, translate them to frames and copy the data.
303
303
@@ -334,7 +334,7 @@ where
334
334
let start_phys_addr = phys_addr. start_address ( ) + start_offset_in_frame;
335
335
336
336
// These are the offsets from the start address. These correspond
337
- // to the destionation indices in `buf`.
337
+ // to the destination indices in `buf`.
338
338
let start_offset_in_buf = Step :: steps_between ( & addr, & start_copy_address) . unwrap ( ) ;
339
339
340
340
// Calculate the source slice.
@@ -364,7 +364,7 @@ where
364
364
///
365
365
/// Panics if a page is not mapped in `self.page_table`.
366
366
unsafe fn copy_to ( & mut self , addr : VirtAddr , buf : & [ u8 ] ) {
367
- // We can't know for sure that contigous virtual address are contigous
367
+ // We can't know for sure that contiguous virtual address are contiguous
368
368
// in physical memory, so we iterate of the pages spanning the
369
369
// addresses, translate them to frames and copy the data.
370
370
@@ -401,7 +401,7 @@ where
401
401
let start_phys_addr = phys_addr. start_address ( ) + start_offset_in_frame;
402
402
403
403
// These are the offsets from the start address. These correspond
404
- // to the destionation indices in `buf`.
404
+ // to the destination indices in `buf`.
405
405
let start_offset_in_buf = Step :: steps_between ( & addr, & start_copy_address) . unwrap ( ) ;
406
406
407
407
// Calculate the source slice.
@@ -639,7 +639,7 @@ where
639
639
// by a Load segment.
640
640
check_is_in_load ( elf_file, rela. get_offset ( ) ) ?;
641
641
642
- // Calculate the destionation of the relocation.
642
+ // Calculate the destination of the relocation.
643
643
let addr = self . virtual_address_offset + rela. get_offset ( ) ;
644
644
let addr = VirtAddr :: new ( addr) ;
645
645
0 commit comments