Skip to content

Frame allocator assumes memory map is in ascending start address order #315

Closed
@tsoutsman

Description

@tsoutsman

Currently, LegacyFrameAllocator::allocate_frame_from_descriptor only ever increases self.next_frame. This is problematic, as the memory map descriptors aren't guaranteed to be in ascending start address order (at least for UEFI). If the first descriptor provided by the memory map were also the one with the largest start address, the frame allocator would not allocate from the other descriptors.

Rather than checking whether self.next_frame < self.start_frame in allocate_frame_from_descriptor, we should set self.next_frame to the start address of the descriptor when we find the next suitable descriptor in allocate_frame.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions