Subject: sysctl HW_PAGESIZE
To: None <tech-perform@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-perform
Date: 02/23/2002 20:39:07
Hello

I was debugging sysconf emulation for IRIX and I had to add some printf
in sysctl() to understand what was going on. 

Theses debug printf's show me that on each process launch, we do a
sysctl HW_PAGESIZE to discover the hardware page size. This is spends a
system call for each program startup to discover something that seems to
be a hardware constant.

Maybe this is a stupid question, but... the page size is CPU related,
right? Is it true that a binary build for a given CPU will always see
the same page size? If it is, then we could get the page size at build
time instead of at run time.

-- 
Emmanuel Dreyfus.  
JavaScript est encapsule dans HTML, qui encapsulait
deja pas mal d'autres conneries comme ca.
manu@netbsd.org