Fractal Page Mapping: Difference between revisions

Jump to navigation Jump to search
m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Reverted edits by Melina148 (talk) to last revision by Khaledhammouda)
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
Line 8:
 
On 32-bit x86, all you need to do is set an entry in the page table to the address of the page table (with appropriate access bits). In examples, the last entry is typically used, but in practice any can be used
<sourcesyntaxhighlight lang="c">
page_directory[1024 - 1] = get_phys_addr(&page_directory[0]) | PAGE_PRESENT | PAGE_WRITABLE;
</syntaxhighlight>
</source>
 
Now, when you access the last 4MB of the physical address space, the CPU will use the page directory as a page table. This leads to the last 4KB of memory being the page directory.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu