vm-allocator: Add accessors for start and end addresses of allocator

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-10-15 11:36:46 +01:00
parent 7cfeefde57
commit a6456b50f3

View File

@ -201,6 +201,16 @@ impl AddressAllocator {
}
}
}
/// Start address of the allocator
pub fn base(&self) -> GuestAddress {
self.base
}
/// Last address of the allocator
pub fn end(&self) -> GuestAddress {
self.end
}
}
#[cfg(test)]