在win下运行跟在linux下运行的结果差太远了,感觉在win下靠谱一点。

以下是window7下用vs2008环境编译的一个TLB以及页表模拟器,读取memorytrace作为模拟指令,得到的结果如下:

Little Endian System

Size (KBytes) =  1024

Number of page frame   = 256

Page size     = 4096

 

references    = 990

instructions  = 4

reads         = 27

writes        = 347

dirty replace = 0

misses        = 16

miss rate     =  1.62%

TLB misses     = 16

TLB miss rate  = 1.61616%

请按任意键继续. . .

而在Ubuntu10.04的gcc编译器下结果就这样了

Little Endian System

Size (KBytes) =  1024

Number of page frame   = 256

Page size     = 4096

 

references    = 10482547

instructions  = 180

reads         = 2802502

writes        = 2300124

dirty replace = 1810

misses        = 1578

miss rate     =  0.02%

TLB misses     = 2389

TLB miss rate  = 0.0227903%

很古怪