bug in sps memory size reporting for Sun-3

James Buster bitbug at vsi1.UUCP
Thu Jun 2 04:09:02 AEST 1988


In article <11753 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>In article <5654 at columbia.edu> dupuy at douglass.columbia.edu
>(Alexander Dupuy) writes:
>>... The header file sps.h assumed that all Suns would have a page size of 2K.
>
>[some diffs deleted; then:]
>>  /* Convert clicks to kbytes ... */
>>! # ifndef PGSHIFT
>>  # define        KBYTES( size )  ((size) << 1)
>>  # else
>>+ # if PGSHIFT > 10
>>+ # define        KBYTES( size )  ((size) << (PGSHIFT - 10))
>>+ # else
>>  # define        KBYTES( size )  ((size) >> (10 - PGSHIFT))
>>+ # endif
>
>Why not simply use the macro that is provided for this purpose?
>
>	#include <sys/param.h>
>
>	#define KBYTES(size) (ctob(size) >> 10) /* or ctob(size) / 1024 */

The KBYTES() macro doesn't exist on Suns (our machines are Sun 3s running
SunOs 3.5), at least, not anywhere in /usr/include/sys, /usr/include,
/sys/h, and /sys/ufs. Do you refer to SunOs 4.0, or 4.3 BSD?

--------------------------------------------
		James Buster
	Mad Hacker Extraordinaire
    ...!{sun,decwrl}!pyramid!vsi1!bitbug
--------------------------------------------
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~



More information about the Comp.sources.bugs mailing list