Add uninit option for VmAllocOption

This commit is contained in:
Jianfeng Jiang
2023-06-01 16:21:39 +08:00
committed by Tate, Hongliang Tian
parent 7304e06c88
commit 7803d9037e
4 changed files with 30 additions and 19 deletions

View File

@ -204,9 +204,7 @@ impl Vmo_ {
let frames = match &inner.pager {
None => {
let vm_alloc_option = VmAllocOptions::new(1);
let frames = VmFrameVec::allocate(&vm_alloc_option)?;
frames.iter().for_each(|frame| frame.zero());
frames
VmFrameVec::allocate(&vm_alloc_option)?
}
Some(pager) => {
let frame = pager.commit_page(offset)?;