Hi, I am about to write MMU.
I have seen some articles about MMU.
But I don't know the first step about writting MMU is enable paging or wirte malloc and free?
About MMU
Re: About MMU
Hi*,
You're going to need to get paging up and going first. There's a nice tutorial on osdever, and there are quite a few more floating around here. (JamesM's, the wiki, etc. - If you're really lost, JamesM's are very comprehensive, so that might make life easier.) There's also the Intel manauals, which, are always useful on these technical matters.
After paging, or nearly after paging, you'll need to be able to allocate physical pages, that is, each actual slab of 4kb that your RAM *actually* has. A stack based approach is generally the easiest. (See here)
Once you can manage your physical pages, you'll need to be able to manage virtual 'regions' of memory, or multiple pages of consecutive virtual memory. Two ways to do this can be found towards the bottom of the aforementioned wiki page on page frame allocation.
On top of this finally comes your malloc. Malloc is, in fact, your last step. dlmalloc is popular, and I hear it is quite nice. (Not having used it myself.)
Have fun,
Alboin
*Everyone else seems to be doing it.
You're going to need to get paging up and going first. There's a nice tutorial on osdever, and there are quite a few more floating around here. (JamesM's, the wiki, etc. - If you're really lost, JamesM's are very comprehensive, so that might make life easier.) There's also the Intel manauals, which, are always useful on these technical matters.
After paging, or nearly after paging, you'll need to be able to allocate physical pages, that is, each actual slab of 4kb that your RAM *actually* has. A stack based approach is generally the easiest. (See here)
Once you can manage your physical pages, you'll need to be able to manage virtual 'regions' of memory, or multiple pages of consecutive virtual memory. Two ways to do this can be found towards the bottom of the aforementioned wiki page on page frame allocation.
On top of this finally comes your malloc. Malloc is, in fact, your last step. dlmalloc is popular, and I hear it is quite nice. (Not having used it myself.)
Have fun,
Alboin
*Everyone else seems to be doing it.
C8H10N4O2 | #446691 | Trust the nodes.