mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-16 07:27:35 +00:00
base: free up all blocks on avl destruction
Issue #3111 remove_range may deny to the job on memory pressure or insane ranges, which ends up in an endless loop when the Avl allocator is in destruction. Since the Avl gets destructed, solely the memory free up is of importance, not the correct range adjustments during remove_range.
This commit is contained in:
parent
526554741f
commit
35cf804471
@ -183,9 +183,13 @@ void Allocator_avl_base::_revert_allocations_and_ranges()
|
||||
(dangling_allocations > 1) ? "s" : "",
|
||||
" at allocator destruction time");
|
||||
|
||||
/* remove ranges */
|
||||
while (Block *block = _addr_tree.first())
|
||||
remove_range(block->addr(), block->size());
|
||||
/* destroy all remaining blocks */
|
||||
while (Block *block = _addr_tree.first()) {
|
||||
if (remove_range(block->addr(), block->size())) {
|
||||
/* if the invocation fails, release the block to break endless loop */
|
||||
_destroy_block(block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user