pub fn prep_memtrack(&self,
                         uart: &mut Uart,
                         buffer: &mut Vec<u8>,
                         schedule: &mut Vec<MemoryTrace>) -> Result<()>
    {
        // Again, timeout is arbitrary.
        uart.set_read_mode(0, Duration::from_millis(100))?;

        schedule.clear();

        let buffer_alloc = 1 * 1024 * 1024;
        buffer.reserve_exact(buffer_alloc);
        // Arbitrary estimation...
        schedule.reserve_exact(buffer_alloc / 10);
        while buffer.len() < buffer_alloc { buffer.push(0); }

        Ok(())
    }
/// Prepare structures for memory tracking.
Prepare structures for memory tracking.
Prepare structures for memory tracking .
pub fn prep_memtrack(&self,
                         uart: &mut Uart,
                         buffer: &mut Vec<u8>,
                         schedule: &mut Vec<MemoryTrace>) -> Result<()>
    {
        // Again, timeout is arbitrary.
        uart.set_read_mode(0, Duration::from_millis(100))?;
        schedule.clear();
        let buffer_alloc = 1 * 1024 * 1024;
        buffer.reserve_exact(buffer_alloc);
        // Arbitrary estimation...
        schedule.reserve_exact(buffer_alloc / 10);
        while buffer.len() < buffer_alloc { buffer.push(0); }
        Ok(())
    }
pub fn prep_memtrack ( & self , uart : & mut Uart , buffer : & mut Vec < u8 > , schedule : & mut Vec < MemoryTrace > ) -> Result < ( ) > { // Again, timeout is arbitrary. uart . set_read_mode ( 0 , Duration :: from_millis ( 100 ) ) ? ; schedule . clear ( ) ; let buffer_alloc = 1 * 1024 * 1024 ; buffer . reserve_exact ( buffer_alloc ) ; // Arbitrary estimation... schedule . reserve_exact ( buffer_alloc / 10 ) ; while buffer . len ( ) < buffer_alloc { buffer . push ( 0 ) ; } Ok ( ( ) ) }
Prepare structures for memory tracking.
Prepare structures for memory tracking .
&self
uart
&mut Uart
buffer
&mut Vec<u8>
schedule
&mut Vec<MemoryTrace>
&self
uart
&mut Uart
buffer
&mut Vec<u8>
schedule
&mut Vec<MemoryTrace>