This is in continuation of above query.

Virtual address is = 32 bit - 10 + 10 + 12 bits
10 bits -> Page directory entry offfset
10 bits -> Page table entry offset
12 bits- > Offset of data within page

---------------
I read somewhere that PAGE_SHIFT macro gives the page number of the page.
Now if we consider this 32 bit address, and shift of 12 bits to the left how
is that justified. I feel confused.


Thank you,
Mrunal


On Mon, Apr 21, 2008 at 8:44 AM, Nikhil Talpallikar <
[EMAIL PROTECTED]> wrote:

> Argh! my mistake. did the math in a hurry.
>
>
> On Mon, Apr 21, 2008 at 9:06 PM, Luciano Rocha <[EMAIL PROTECTED]>
> wrote:
>
> > On Mon, Apr 21, 2008 at 08:42:55PM +0530, Nikhil Talpallikar wrote:
> > > Hi,
> > >
> > > Then should not the PAGE_SHIFT be 13 for the page size to be 4k on a
> > x86
> > > arch.?
> >
> > Hm? 1 << 12 == 2^12 == 4096.
> >
> > --
> > Luciano Rocha <[EMAIL PROTECTED]>
> > Eurotux Informática, S.A. <http://www.eurotux.com/>
> >
>
>

Reply via email to