9

A full 4 level page table on x86_64 is over around 687 GB in size. Allocating it fixed size obviously won't work...

So now when allocating virtual memory pages for an address space I sooner or later have to allocate one page to hold a new page table... which has to be referenced by the global page table for me to use... where there isn't any more space... which is exactly the reason we allocated a new page in the first place... so I'm fucked basically

Comments
  • 1
    @Lasoloz you asked for it ;)
  • 1
    @12bitfloat Thanks! Good look figuring it out! ;)
  • 1
    @Lasoloz Thank god I have enough beer :D
  • 2
    Isn't the solution to reserve some space to point to a different table, which itself contains pointers to page tables?
  • 0
    @Wack Good question, not quite sure. Because physical memory fragmentation doesn't matter I think the best solution is to allocate another page on the fly instead of reserving

    Now that I'm thinking about it the page table only contains physical addresses so it's quite trivial: Traverse the page table to the target address down to t0, allocating a new page table if it doesn't exist
  • 2
    Dafuq is a page table?
  • 0
    @willhertz A page tables maps physical memory pages to virtual addresses
  • 1
    Yo dawg, I heard you like page tables
Add Comment