(&mut self)
| 3055 | } |
| 3056 | |
| 3057 | fn snapshot(&mut self) -> result::Result<Snapshot, MigratableError> { |
| 3058 | let memory_ranges = self.memory_range_table(true)?; |
| 3059 | |
| 3060 | // Store locally this list of ranges as it will be used through the |
| 3061 | // Transportable::send() implementation. The point is to avoid the |
| 3062 | // duplication of code regarding the creation of the path for each |
| 3063 | // region. The 'snapshot' step creates the list of memory regions, |
| 3064 | // including information about the need to copy a memory region or |
| 3065 | // not. This saves the 'send' step having to go through the same |
| 3066 | // process, and instead it can directly proceed with storing the |
| 3067 | // memory range content for the ranges requiring it. |
| 3068 | self.snapshot_memory_ranges = memory_ranges; |
| 3069 | |
| 3070 | Ok(Snapshot::from_data(SnapshotData::new_from_state( |
| 3071 | &self.snapshot_data(), |
| 3072 | )?)) |
| 3073 | } |
| 3074 | } |
| 3075 | |
| 3076 | /// Write a single guest RAM region to the snapshot file at `dst_offset`, |
nothing calls this directly
no test coverage detected