[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pgd clarification
Aiee :)
Hello!
Even if I'm really far from understanding the memory management under
Linux, I'll try to give my thoughts.
Feel really free to correct my mistakes :)
(What follows is intended for i386 arch)
On Mon, May 21, 2001 at 08:28:56PM +0530, Santosh Eraniose wrote:
> Hello,
> In the mm_struct structure I notice only an entry for pgd_t* pgd.
> Cannot a process memory space occupy more that 4MB of virtual addr space.
> In that case how is one pgd sufficient?
> 1pgd can address 1024*4*1024 =4MB. or a 4k page
That is a pointer to a pgd_t data type which holds the 32-bit
physical address of the process' Page Global Directory in memory
(The one which is kept by the cr3 register - uhm I'm not sure
about what I said above, so feel free to correct myself :))
The PGD table has 1024 entries.
Eeach PGD's entry point to a Page Table which has 1024 entries too.
Eeach PTE point to a 4K Page Frame.
This can give us 1024 * 1024 * 4 * 1024 = 4GB of VMA
|------|-----|----|-----> from the Page Global Directory
|-----|----|-----> from the Page Tables
|----|-----> from each PTE
(I know nothing about 4MB Page Frames)
> I expected a list of pgd so that on a pagefault, the process would navigate
The Page Global Directory is like an array (never looked at the code, tho)
> Thanks in advance.
> regards
>
> --
> Santosh Eraniose
bye bye
-- gg sullivan
--
Lorenzo Cavallaro `Gigi Sullivan' <sullivan@sikurezza.org>
Until I loved, life had no beauty;
I did not know I lived until I had loved. (Theodor Korner)
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/