Subject: re: sysctl HW_PAGESIZE
To: Emmanuel Dreyfus <>
From: matthew green <>
List: tech-perform
Date: 02/24/2002 11:28:59
   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.

SPARC machines come with different page sizes.  sun4 and sun4u machines
(the oldest and the newest) have 8KB by default, and sun4c and sun4m
(the 2nd oldest and 2nd newest) have 4KB by default, yet all can run
32 bit SPARC software happily...  there are also things like large
pages in some SPARC as well.