mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-27 03:13:23 +00:00
Rename various concepts related to memory management
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
03a39c94ca
commit
14e1b1a9fc
@ -21,7 +21,7 @@ mod test {
|
||||
bio::{BioEnqueueError, BioStatus, BioType, SubmittedBio},
|
||||
BlockDevice,
|
||||
};
|
||||
use aster_frame::vm::{VmAllocOptions, VmIo, VmSegment};
|
||||
use aster_frame::mm::{Segment, VmAllocOptions, VmIo};
|
||||
use rand::{rngs::SmallRng, RngCore, SeedableRng};
|
||||
|
||||
use crate::{
|
||||
@ -37,10 +37,10 @@ mod test {
|
||||
|
||||
/// Followings are implementations of memory simulated block device
|
||||
pub const SECTOR_SIZE: usize = 512;
|
||||
struct ExfatMemoryBioQueue(VmSegment);
|
||||
struct ExfatMemoryBioQueue(Segment);
|
||||
|
||||
impl ExfatMemoryBioQueue {
|
||||
pub fn new(segment: VmSegment) -> Self {
|
||||
pub fn new(segment: Segment) -> Self {
|
||||
ExfatMemoryBioQueue(segment)
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ mod test {
|
||||
}
|
||||
|
||||
impl ExfatMemoryDisk {
|
||||
pub fn new(segment: VmSegment) -> Self {
|
||||
pub fn new(segment: Segment) -> Self {
|
||||
ExfatMemoryDisk {
|
||||
queue: ExfatMemoryBioQueue::new(segment),
|
||||
}
|
||||
@ -100,7 +100,7 @@ mod test {
|
||||
static EXFAT_IMAGE: &[u8] = include_bytes!("../../../../../regression/build/exfat.img");
|
||||
|
||||
/// Read exfat disk image
|
||||
fn new_vm_segment_from_image() -> VmSegment {
|
||||
fn new_vm_segment_from_image() -> Segment {
|
||||
let vm_segment = {
|
||||
VmAllocOptions::new(EXFAT_IMAGE.len() / PAGE_SIZE)
|
||||
.is_contiguous(true)
|
||||
|
Reference in New Issue
Block a user