home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / lisp / lispnews / text0181.txt < prev    next >
Encoding:
Text File  |  1985-11-10  |  1.6 KB  |  55 lines

  1. This really isn't a bug so much as a deficiency
  2. in the code.  We are running Opus 38.26 and recently
  3. had need to increase the constant TTSIZE (in config.h)
  4. above the default 10216.  It turns out that this
  5. breaks the garbage collector which will fail
  6. to completely clear the array bitmapi
  7. if given a TTSIZE greater 10216 (during the
  8. clearing out of bit maps).  The offending code
  9. is in Talloc.c (or alloc.c, depending on your Opus).
  10. The old code is:
  11.  
  12.     /* try the movc5 to clear the bit maps */
  13.     /* the maximum number of bytes we can clear in one sweep is
  14.      * 2^16 (or 1<<16 in the C lingo)
  15.      */
  16.     bytestoclear = ((((int)datalim)-((int)beginsweep)) >> 9) * 16; 
  17.     if(bytestoclear > MAXCLEAR)
  18.     { 
  19.        blzero(((int) &bitmapi[((int)beginsweep>>7)]) + MAXCLEAR, 
  20.                 bytestoclear - MAXCLEAR);
  21.        bytestoclear = MAXCLEAR;
  22.     }
  23.     blzero((int)&bitmapi[((int)beginsweep)>>7],bytestoclear);
  24.  
  25. and the fixed version that we have been running for several weeks
  26. now is:
  27.  
  28.     /* try the movc5 to clear the bit maps */
  29.     /* the maximum number of bytes we can clear in one sweep is
  30.      * 2^16 (or 1<<16 in the C lingo)
  31.      */
  32.     bytestoclear = ((((int)datalim)-((int)beginsweep)) >> 9) * 16;
  33.     {int count = 0; 
  34.         while (bytestoclear > 0) {
  35.         if(bytestoclear > MAXCLEAR)
  36.         { 
  37.            blzero(((int) &bitmapi[((int)beginsweep>>7)])+count*MAXCLEAR, 
  38.                 MAXCLEAR);
  39.            ++count;
  40.         }
  41.         else
  42.             blzero(((int)&bitmapi[((int)beginsweep)>>7]+count*MAXCLEAR),
  43.             bytestoclear);
  44.            bytestoclear -= MAXCLEAR;
  45.         }
  46.     }
  47.  
  48. The old code is still present in Opus 38.56.
  49.  
  50. Alfred Correira
  51. Paul Robertson
  52. ...ucbvax!nbires!ctvax!alfred (UUCP)
  53. alfred.ct@Rand-Relay (CSNET)
  54.  
  55.