mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Implement copy for VmFrame
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
38ee2cafcd
commit
3a3cb7cd15
@ -216,12 +216,12 @@ impl VmoInner {
|
||||
if self.should_share_frame_with_parent(write_page) {
|
||||
return Ok(inherited_frame);
|
||||
}
|
||||
|
||||
|
||||
let frame = {
|
||||
let options = VmAllocOptions::new(1);
|
||||
VmFrameVec::allocate(&options)?.pop().unwrap()
|
||||
};
|
||||
frame.write_bytes(0, &*tmp_buffer)?;
|
||||
frame.copy_from_frame(&inherited_frame);
|
||||
Ok(frame)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user