Subject: Re: NBPG
To: None <root@garbled.net>
From: Noriyuki Soda <soda@sra.co.jp>
List: port-sparc
Date: 07/25/1998 02:28:07
>>>>> On Thu, 23 Jul 1998 17:37:06 -0700 (MST),
	Tim Rightnour <root@garbled.net> said:

 > >> #define        CLBYTES         (CLSIZE * sysconf(_SC_PAGESIZE))
>  > 
>  > is incorrect. Just use sysconf(_SC_PAGESIZE).

> Is that the right thing to do though?  That makes the use of that
> macro require #include <unistd.h> That doesn't seem right for a
> machine header.  Using that in a program is fine.. but I don't think
> the header should have a dependency on a POSIX header.


	#define CLBYTES sysconf(_SC_PAGESIZE)
is incorrect, too.

What I'd like to say is "Just use sysconf(_SC_PAGESIZE), instead of CLBYTES."
i.e. similar to your opinion. 

BTW, as Saitoh-san said, getpagesize() seems to be better on performance.
--
soda