Page 1 of 1

Paging.

Posted: Sun Aug 24, 2008 2:31 pm
by System123
I made alot of progress on my kernel this weekend. I am busy implementing my paging now. I wanted to find out are how many page tables i should have? In the tutorials i have read they all say 2. Table 1 at 0x0 and table 768 at 0x100000. Is this correct? The other thing i wanted to find out is how to dynamically free and allocate memory?

Re: Paging.

Posted: Sun Aug 24, 2008 3:25 pm
by Combuster
I suggest you start reading up on the basics before asking such questions. http://www.jamesmolloy.co.uk/tutorial_html/index.html

Short answers:
Q1) I can't tell.
Q2) At least one guide I know uses no page tables
Q3) Your math's off.
Q4) See above link.

Re: Paging.

Posted: Sun Aug 24, 2008 3:38 pm
by cr2
The number of page tables that you should have depends on how big you want your address space to be(the maximum is 1024, or 4G of memory)(each page table gives you access to 4M of memory).

For dynamic memory allocation, http://wiki.osdev.org/Memory_Allocation might also help.

Re: Paging.

Posted: Sun Aug 24, 2008 10:29 pm
by System123
Thanks thats all i wanted to know