pub fn resize_region<E: UserDefinedError>(
        &mut self,
        index: usize,
        new_len: u64,
    ) -> Result<(), EbpfError<E>> {
        if index < self.regions.len() - 1
            && self.regions[index].vm_addr + new_len > self.regions[index + 1].vm_addr
        {
            return Err(EbpfError::VirtualAddressOverlap(
                self.regions[index + 1].vm_addr,
            ));
        }
        self.regions[index].len = new_len;
        Ok(())
    }
/// Resize the memory_region at the given index
Resize the memory_region at the given index
Resize the memory_region at the given index
pub fn resize_region<E: UserDefinedError>(
        &mut self,
        index: usize,
        new_len: u64,
    ) -> Result<(), EbpfError<E>> {
        if index < self.regions.len() - 1
            && self.regions[index].vm_addr + new_len > self.regions[index + 1].vm_addr
        {
            return Err(EbpfError::VirtualAddressOverlap(
                self.regions[index + 1].vm_addr,
            ));
        }
        self.regions[index].len = new_len;
        Ok(())
    }
pub fn resize_region < E : UserDefinedError > ( & mut self , index : usize , new_len : u64 , ) -> Result < ( ) , EbpfError < E > > { if index < self . regions . len ( ) - 1 && self . regions [ index ] . vm_addr + new_len > self . regions [ index + 1 ] . vm_addr { return Err ( EbpfError :: VirtualAddressOverlap ( self . regions [ index + 1 ] . vm_addr , ) ) ; } self . regions [ index ] . len = new_len ; Ok ( ( ) ) }
Resize the memory_region at the given index
Resize the memory_region at the given index
&mut self
index
usize
new_len
u64