-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physical memory manager #5
Comments
I'd like to help with this issue. I'm learning about kernels and I really would like to help design one. |
Nice! What are your ideas for this memory manager? |
I'm honestly not sure, would you be able to help me with designing it? I understand the theory behind memory management but I've yet to implement it. Do you have any suggestions? |
I was thinking about starting with a simple bitmap-based physical memory manager, just to get started, and improving it over time. In it, each bit would represent a physical page of memory, 4kb. I am still reading about it, but I think it's OK for a start... |
So it's going to be a heap of memory with each block pointing to 4KB of memory? |
No, more like this: http://wiki.osdev.org/Page_Frame_Allocation#Bitmap Just a simple array for the bitmap. A heap would consume too much memory. |
I started doing the physical memory manager in a68ca7f. It does basic things, but can be improved. I did some TODO items in the PMM.cpp file, to be solved. I will replicate them here:
|
This solves the allocation flags problem mentioned on #5, since the type is controlled by a flag. This differentiation happens on allocation, where the PMM determines what address ranges are eligible for being allocatable in that moment, and choosing the best among them. Also, don't let the dude allocate pages from MMIO addresses, just map.
Design and create a physical memory manager, so we know how much memory we have, and what blocks are occupied
This will be the base for the virtual memory manager, and for virtual memory allocations, and paging
This might help with directions
The text was updated successfully, but these errors were encountered: