From a6456b50f3cde22001fff5d858a5b4cc21ab9d46 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Fri, 15 Oct 2021 11:36:46 +0100 Subject: [PATCH] vm-allocator: Add accessors for start and end addresses of allocator Signed-off-by: Rob Bradford --- vm-allocator/src/address.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vm-allocator/src/address.rs b/vm-allocator/src/address.rs index 30d8ec5ef..73c1b6c8c 100644 --- a/vm-allocator/src/address.rs +++ b/vm-allocator/src/address.rs @@ -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)]