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:
Justin C. Miller
2019-03-03 01:38:07 -08:00
parent 28cf5562ac
commit 194527e0fe
4 changed files with 15 additions and 6 deletions

View File

@@ -304,7 +304,6 @@ memory_initialize(uint16_t scratch_pages, const void *memory_map, size_t map_len
// Now go back through these lists and consolidate
block_slab.append(frame_block::consolidate(free));
block_slab.append(frame_block::consolidate(used));
region_allocator region_slab(page_size, allocator);
region_slab.allocate(); // Allocate some buddy regions for the address_manager