[Feature]: Check if a given memory area is allocated.
jarkkojs opened this issue · 1 comments
jarkkojs commented
Is there an existing issue for this?
- I have searched the existing issues
Description
Needed for the shim-sgx heap. Usage example:
fn is_allocated(&self, index: usize) -> bool {
self.is_allocated_range(index..index)
}
fn is_allocated_range(&self, range: core::ops::Range<usize>) -> bool {
self.ledger.is_allocated(Region::new(
Address::new(range.start * size_of::<Page>()),
Address::new(range.end * size_of::<Page>()),
))
}
Acceptance Criteria
No response
Suggestions for a technical implementation
No response
jarkkojs commented
not a priority, will be done internally to enarx