Subject: Re: vtopte() problems
To: ycchang <ycchang@cirx.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 05/20/2003 13:18:46
On Tuesday, May 20, 2003, at 10:47  AM, ycchang wrote:

> So , should vtopte() return PTE_BASE + i386_btop(va)*4?

Note that PTE_BASE is defined like so:

#define PTE_BASE        ((pt_entry_t *)  (PDSLOT_PTE * NBPD) )

So, when you add to it, it does pointer arithmetic, which implicitly 
does the * sizeof(pt_entry_t *) (which is 4).

         -- Jason R. Thorpe <thorpej@wasabisystems.com>