pub fn memory_read<T>(base_address: *mut T, count: usize) -> T
where
    T: std::fmt::Display + std::cmp::PartialEq,
{
    let page_num = page_num(base_address, count);
    let address = unsafe { base_address.offset(count as isize) };
    let value = unsafe { std::ptr::read(address) };
    info!(
        "READ  0x{:x} page({}) memory[{}] = {}",
        address as u64, page_num, count, value
    );
    value
}
// Helper function to perform a memory read `base_address[count]` and print additional information.
Helper function to perform a memory read `base_address[count]` and print additional information.
Helper function to perform a memory read ` base_address [ count ] ` and print additional information .
pub fn memory_read<T>(base_address: *mut T, count: usize) -> T
where
    T: std::fmt::Display + std::cmp::PartialEq,
{
    let page_num = page_num(base_address, count);
    let address = unsafe { base_address.offset(count as isize) };
    let value = unsafe { std::ptr::read(address) };
    info!(
        "READ  0x{:x} page({}) memory[{}] = {}",
        address as u64, page_num, count, value
    );
    value
}
pub fn memory_read < T > ( base_address : * mut T , count : usize ) -> T where T : std :: fmt :: Display + std :: cmp :: PartialEq , { let page_num = page_num ( base_address , count ) ; let address = unsafe { base_address . offset ( count as isize ) } ; let value = unsafe { std :: ptr :: read ( address ) } ; info ! ( " " address as u64 page_num count value ) ; value }
Helper function to perform a memory read `base_address[count]` and print additional information.
Helper function to perform a memory read ` base_address [ count ] ` and print additional information .
base_address
*mut T
count
usize
base_address
*mut T
count
usize