chris wrote:At the moment, the only problem is if a linked list(s) would go well with my physical memory allocator, to manage which physical pages are used and not used. Also, if I use a linked list, how I would set it up without malloc or something.
I can give you an answer when I've worked out the best way to do this myself
.
OK, normally allocating items for a linked list is easy -- just use malloc. We'll ignore that for now as you don't have malloc available at this point in initialisation.
What I've been doing is setting aside a block of memory to contain all the list items in the page list, one per page. Then, when you want the page at address A, you get the item at mem_pages + (A / PAGE_SIZE). The problem is where to put this block. At the moment it goes after the end of the last multiboot module. I'm currently hitting a problem where, if you have lots of memory installed, or you have lots of modules loaded, the pages block goes across a 4MB boundary. The paging setup code at the start is pretty simple, because there's no way of dynamically allocating page tables, so at the moment I've decided to map 8MB at startup and hope that's enough.
@Tim; Btw, are you going to write the other tutorials that are mentioned in the MM ones. The MM ones are very useful:).
Maybe, but not any time soon...