Path: utzoo!attcan!uunet!husc6!rutgers!columbia!douglass!dupuy From: dupuy@douglass.columbia.edu (Alexander Dupuy) Newsgroups: comp.sources.bugs Subject: bug in sps memory size reporting for Sun-3 Summary: Sun-2 != Sun-3 Message-ID: <5654@columbia.edu> Date: 20 May 88 00:27:38 GMT Sender: nobody@columbia.edu Reply-To: dupuy@columbia.edu (Alexander Dupuy) Organization: Columbia University Computer Science Dept. Lines: 40 I'm shocked I never noticed this before, but lots of programs (like the csh) report erroneous memory sizes. At any rate, the Sun-2 and Sun-2 have different page sizes (2K for the Sun-2, 8K for the Sun-3). The header file sps.h assumed that all Suns would have a page size of 2K. Here are the diffs: *** sps.h.dist Tue Feb 24 18:44:50 1987 --- sps.h Thu May 19 20:20:49 1988 *************** *** 22,31 **** # endif /* Convert clicks to kbytes ... */ ! # ifdef SUN # define KBYTES( size ) ((size) << 1) # else # define KBYTES( size ) ((size) >> (10 - PGSHIFT)) # endif /* Standard files to be examined ... */ --- 22,35 ---- # endif /* 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 # endif /* Standard files to be examined ... */ @alex inet: dupuy@columbia.edu uucp: ...!rutgers!columbia!dupuy