lkml.org 
[lkml]   [2009]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Bug Fix]: Do 32-bit table calculations in pre-processor
On 07/03/09 11:38, Michael S. Zick wrote:
> I make no claims for it at the moment - too early in the test process.
> Just the general observation that it takes 0.5M to describe 0.5G of ram.
>
Only if you're using 4k pages. With large pages, 1 pte can map 2M, so
256 entries can map 512M, so you only need 1/2 a page of pagetable
(assuming PAE; if not a single entry can map 4M).

> Also,
> the observation that (1<<32) drops the bit off the left end of a 32-bit value.
> You can see the result in the portion of the post you snipped out. ;)
>

Those computations aren't done as 32-bit.

$ as << EOF
.data
.byte (1 << 100) >> 100
EOF
$ objdump -D a.out

a.out: file format elf64-x86-64

Disassembly of section .data:

0000000000000000 <.data>:
0: 01 .byte 0x1


J


\
 
 \ /
  Last update: 2009-07-03 21:11    [W:0.050 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site