Skip to content

Commit 9a474cb

Browse files
committed
Update address_allocator.rs
Signed-off-by: ylzh10 <[email protected]>
1 parent e0e6584 commit 9a474cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/address_allocator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ impl AddressAllocator {
6666
policy: AllocPolicy,
6767
) -> Result<RangeInclusive> {
6868
let constraint = Constraint::new(size, alignment, policy)?;
69-
let allocated = self.interval_tree.allocate(constraint);
69+
let allocated = self.interval_tree.allocate(constraint)?;
7070
self.available -= allocated.len() as usize;
71-
allocated
71+
Ok(allocated)
7272
}
7373

7474
/// Deletes the specified memory slot or returns `ResourceNotAvailable` if

0 commit comments

Comments
 (0)