Fix address-marking bugs
* Non-blocksize-aligned regions could fail to be found. Have the bootloader load them aligned. * Consolidating used frame blocks in the bootstrap means these would have been impossible to free as address space * mark_permanent wasn't actually removing blocks from the free list
This commit is contained in:
@@ -8,7 +8,7 @@ namespace kutil {
|
||||
|
||||
using address_manager =
|
||||
buddy_allocator<
|
||||
16, // Min allocation: 64KiB
|
||||
12, // Min allocation: 4KiB
|
||||
36 // Max allocation: 64GiB
|
||||
>;
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ public:
|
||||
for (unsigned i = size_max; i >= size_min; --i) {
|
||||
for (auto *r : free_bucket(i)) {
|
||||
if (start >= r->address && end <= r->end()) {
|
||||
free_bucket(i).remove(r);
|
||||
delete_region(r, start, end);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user