In xv6 each process has a struct called proc which stores the process's state. it has a field called pgdir which point to it's page directory. My question is that: It should store the index of the last element in its page directory. I mean if it wants to allocate a new page table it should put a reference of it in pgdir. My question is how does it know where the next element of page directory is?
This image explains my question more:
Thanks for your help.