fn translate_vas(&self, vas: &[usize]) -> Vec<usize> {
        let mut pas = vec![0u64; vas.len()];
        let mut vec_vas = vec![0u64; vas.len()];
        for va in vas.iter() {
            vec_vas.push(*va as u64);
        }
        sys_get_paddr(&vec_vas[..], &mut pas[..]);
        let mut res = vec![0usize; vas.len()];
        for pa in pas {
            res.push(pa as usize);
        }
        res
    }
// Bulk translate virtual addresses to physical addresses for performance
Bulk translate virtual addresses to physical addresses for performance
Bulk translate virtual addresses to physical addresses for performance
fn translate_vas(&self, vas: &[usize]) -> Vec<usize> {
        let mut pas = vec![0u64; vas.len()];
        let mut vec_vas = vec![0u64; vas.len()];
        for va in vas.iter() {
            vec_vas.push(*va as u64);
        }
        sys_get_paddr(&vec_vas[..], &mut pas[..]);
        let mut res = vec![0usize; vas.len()];
        for pa in pas {
            res.push(pa as usize);
        }
        res
    }
fn translate_vas ( & self , vas : & [ usize ] ) -> Vec < usize > { let mut pas = vec ! [ 0u64 vas len ( ) ] ; let mut vec_vas = vec ! [ 0u64 vas len ( ) ] ; for va in vas . iter ( ) { vec_vas . push ( * va as u64 ) ; } sys_get_paddr ( & vec_vas [ .. ] , & mut pas [ .. ] ) ; let mut res = vec ! [ 0usize vas len ( ) ] ; for pa in pas { res . push ( pa as usize ) ; } res }
Bulk translate virtual addresses to physical addresses for performance
Bulk translate virtual addresses to physical addresses for performance
&self
vas
&[usize]
&self
vas
&[usize]