Re: PAGE_SIZE query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <nikhil.talpallikar@xxxxxxxxx> wrote:
Argh! my mistake. did the math in a hurry.


On Mon, Apr 21, 2008 at 9:06 PM, Luciano Rocha <luciano@xxxxxxxxxxx> 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 <luciano@xxxxxxxxxxx>
Eurotux Informática, S.A. <http://www.eurotux.com/>



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux