bug in sps memory size reporting for Sun-3

Chris Torek chris at mimsy.UUCP
Fri Jun 3 04:18:17 AEST 1988


In article <1050 at cresswell.quintus.UUCP> ok at quintus.UUCP
(Richard A. O'Keefe) writes:
>Since Chris Torek was suggesting that YOU should #define KBYTES
>it is hardly surprising that the macro doesn't already exist.

Right.

>If the only thing you want is ctob() (or PGSHIFT or NBPG) it suffices
>to get it from <machine/param.h> (which <sys/param.h> includes).

It is in <machine/machparam.h> in 4.3BSD (or 4.3++ anyway).  That was
why I suggested <sys/param.h>.  <sys/param.h> also gets <sys/types.h>
which sps needs anyway.

>And (
>	#define KBYTES(size) (ctob(size) >> 10)
>Or
>	#define KBYTES(size) ((size)*NBPG/1024)
>)

Core clicks (what ctob() converts) and NBPG are not necessarily the
same (I think...).  (There is a profusion of abstractions [clicks,
bytes, pages, segments, clusters, disk blocks, and file system blocks:
did I forget any? :-) ] in the 4BSD VM code; I think some are likely to
get clobbered in the future.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.sources.bugs mailing list