mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 02:13:24 +00:00
Fix the incorrect range in SegmentSlice
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
d15aacfb4d
commit
ee33216875
@ -126,9 +126,10 @@ impl VmIo for SegmentSlice {
|
|||||||
|
|
||||||
impl From<Segment> for SegmentSlice {
|
impl From<Segment> for SegmentSlice {
|
||||||
fn from(segment: Segment) -> Self {
|
fn from(segment: Segment) -> Self {
|
||||||
|
let range = 0..segment.nbytes() / PAGE_SIZE;
|
||||||
Self {
|
Self {
|
||||||
inner: Arc::new(segment),
|
inner: Arc::new(segment),
|
||||||
range: 0..1,
|
range,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user