Conversation
adapting the multiboot structures by setting some values to public
This is the very begining of the PFA, the PFA is in charge of mapping the memory into pages, and keep track of free pages. To archieve this it uses an internal bitmap, set to 1 if a page is in use or reserved, to 0 if the page is free.
The page frame allocator does now mark as "reserved" (set bit to 1 on bitmap) The reserved pages include grub marked as reserved and the kernel in memory and finally the bitmap itself.
Changes how the bitmap reserving works. Because GRUB does not give us the whole memory we have to mark usable memory only with hose that grub excplicitly marks as usable. And we have to keep the lower memory reserved.
Since the mod is already named pageframe, allocator is enough to be called pageframe::Allocator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the page frame allocator allocates blocs of physical memory that are size of a Page (4096 bytes).