Paging question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Guest

Paging question

Post by Guest »

Hello, how is that possible that more programs can be in the memory in the same time ? You start a program and that has been loaded to 0x400000 after you start another program that will be loaded to 0x400000 and then ? I have heard that paging can fix that problem but how ?
AR

Re:Paging question

Post by AR »

Physical and virtual memory are seperate things. Where something is in virtual memory doesn't say anything about where it is in physical memory. So to use your example, 0x40000 in the first app could be mapped at physical 0x5000, 0x40000 is the second app could be at 0x26000 physical, and so on. The address spaces are changed by simply loading a new page directory into CR3.

Other thing to remember: Not every virtual address needs a physical address, if a physical address isn't specified when that location is accessed, it will cause a page fault allowing the Kernel to load a page in only when necessary.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Paging question

Post by Pype.Clicker »

The FAQ may help ...
Post Reply