Closed MarcoCicognani closed 3 years ago
Thanks for the pull request and sorry for the delay. While I understand your use case in #40, I don't think that modifying the Heap
type is the best solution for this. My problem with it is that the API gets more complex and that the top
and bottom
methods might return None
now. I would prefer to implement your second suggestion instead:
Otherwise you could make public the HoleList module to allow external uses.
This way, we keep the general API simple while still supporting users with more complex use cases. Would this work for you?
In case we implement this, I think we should move the align_layout
function into the HoleList
, so that the Heap
type becomes just a trivial wrapper around HoleList
.
Hi Phil, don't worry for the late. Yes, I think that your solution is the best way to cover my needs
Hi Phil,
Heap::extend_with_region(&mut self, start_addr: usize, size: usize)
Heap::contiguous
field andHeap::is_contiguous()
propertyHeap::bottom() -> usize
&Heap::top() -> usize
toHeap::bottom() -> Option<usize>
&Heap::top() -> Option<usize>
to returnSome
only whenHeap::contiguous
istrue