The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: ninjarider on July 30, 2007, 11:53:18 PM

Title: paging and protected memory
Post by: ninjarider on July 30, 2007, 11:53:18 PM
currently reading on protected memory and stuff. from what i've been reading so far, you can only have 1 page size.

my question:
what is the average size code, data, and stack sections in programs that will run on a computer.
think i've read somewere were you can mix 4mb and 4kb pages is this true.

[edit]
answered the mixing 4mb and 4kb. my question about it is how is it done.
Title: Re: paging and protected memory
Post by: Tedd on July 31, 2007, 12:16:02 PM
There's a 'page-size' bit in the page-directory entries - when it's clear the page size is 4kB, and 4MB when set.

(Intel System Programming Guide, Protected-Mode Memory Management chapter has all the details :wink)
Title: Re: paging and protected memory
Post by: MichaelW on July 31, 2007, 10:10:33 PM
And there is some related code  here (http://www.x86.org/articles/4mpages/4moverview.htm).