Virtual memory layout
Posted: Thu Jul 14, 2005 6:16 am
My OS is going to lie to the applications about memory, much as is standard practice. My current thoughts for actual physical memory layout are:
0 - 1Mb = Untouchable as of the end of boot in case I need anything from there
1 - 16Mb = Reserved for old-school DMA transfers
16 - Whatever = OS
Whatever - EndOfMemory = Application space
I'm probably going to go with the roughly usual layout for virtual memory (OS gets a 1Gb, apps get 2Gb, whatever), but I was wondering if it would be any benefit to map in the 0 - 1Mb range (probably in the OS's Gb) or if any apps that want data from the EBDA or somewhere should have to go through the OS to get it.
I can't see any circumstances in which an app would need to be able to read the data from there, but then I don't want to be too restrictive either, so I'm a bit torn. Drivers might need to, but they can have it mapped anyway even if apps don't.
My current thought is to not map it into the app memory space and to give them a set of API calls if they need specific data. Does anyone have thoughts on this?
0 - 1Mb = Untouchable as of the end of boot in case I need anything from there
1 - 16Mb = Reserved for old-school DMA transfers
16 - Whatever = OS
Whatever - EndOfMemory = Application space
I'm probably going to go with the roughly usual layout for virtual memory (OS gets a 1Gb, apps get 2Gb, whatever), but I was wondering if it would be any benefit to map in the 0 - 1Mb range (probably in the OS's Gb) or if any apps that want data from the EBDA or somewhere should have to go through the OS to get it.
I can't see any circumstances in which an app would need to be able to read the data from there, but then I don't want to be too restrictive either, so I'm a bit torn. Drivers might need to, but they can have it mapped anyway even if apps don't.
My current thought is to not map it into the app memory space and to give them a set of API calls if they need specific data. Does anyone have thoughts on this?