Path: utzoo!attcan!uunet!world!bzs From: bzs@world.std.com (Barry Shein) Newsgroups: comp.unix.internals Subject: Re: The definition/size of click anyone? Message-ID: Date: 18 Sep 90 01:30:19 GMT References: <1990Sep17.212128.14687@ericsson.se> Sender: bzs@world.std.com (Barry Shein) Organization: The World Lines: 39 In-Reply-To: rom@mvsun.ericsson.se's message of 17 Sep 90 21:21:28 GMT From: rom@mvsun.ericsson.se (Robert Malmgren TK/DG) >I use a Sun 3/80 running SunOS 4.1 and need to know the size/definition >of a "click" for a program I'm working on. The following is from : /* Clicks (MMU PAGES) to bytes, and back (with rounding) */ #define ctob(x) mmu_ptob(x) #define btoc(x) mmu_btopr(x) tracing back those defs we find... /* * MMU pages to bytes, and back (with and without rounding) */ #define mmu_ptob(x) ((x) << MMU_PAGESHIFT) #define mmu_btopr(x) ((((unsigned)(x) + MMU_PAGEOFFSET) >> MMU_PAGESHIFT)) And tracing that back we find... #define MMU_PAGESIZE 0x2000 /* 8192 bytes */ #define MMU_PAGESHIFT 13 /* log2(MMU_PAGESIZE) */ #define MMU_PAGEOFFSET (MMU_PAGESIZE-1)/* Mask of address bits in page */ So, in this case a "click" is 8192 (0x2000) bytes. On a Vax it's 512 bytes (on 4.3 that's in ). Obviously, this is machine dependant, but look in and don't give up so easily :-) I suppose a definition would be: The pagesize in bytes defined by a single MMU slot (hardware dependent.) -- -Barry Shein Software Tool & Die | {xylogics,uunet}!world!bzs | bzs@world.std.com Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD