Improve process memory#843
Conversation
|
This PR move the kernel heap from Next step is to refactor process page table creation. |
|
The new process page table with just what is needed for the process is starting to work. We can now run more than one process at a time again. TODO: Remove the page fault instruction fetching hack |
|
The mapper
So we can't use it anymore. Indeed it was cleaning up the frame used for L4=160 that was then re-used for the next process page table, creating a copy of the previous page table inside L4=160. |
|
TODO: Stop using shared high memory for processes. Copy flat binaries to a fixed location (0x800000) and ELF binaries to where they've been linked to (hopefully 0x800000 also), using the physical frames allocated to that location in the user page table. Something like that. |
This PR create the process page table from scratch, sharing only what is needed instead of cloning every tables. The kernel heap area and the processes area (in the kernel page table) were moved to different L4 indexes to simplify this.
The processes area in the kernel page table located high in memory is also remapped low in the process page table where programs are linked, to avoid a hack in the page fault handler where this was done as demand paging backed by memory, that is by copying the program code from high memory during instruction fetching.