simonmar    2002/07/10 02:29:00 PDT

  Modified files:
    ghc/rts              GC.c Schedule.c 
  Log:
  Fix a GC bug.  In a "large block", only the block descriptor for the
  head of the block has the fields step, gen_no and flags set.  So
  whenever we want one of these fields in the descriptor for a random
  object anywhere in the large block, we have to check whether it is in
  the head block, and if not follow the link to the head block
  descriptor.
  
  evacuate() was doing this correctly, but isAlive() wasn't (and
  goodness knows what other places are broken in this way - I identified
  several other possible cases of the same bug).
  
  So to try to make things more robust, when we allocate a large block
  we now initialise the step, gen_no, and flags fields in the descriptor
  for *every* sub-block, not just the first one.  Now, as long as you
  only want one of these fields from the descriptor, there's no need to
  try to find the block head.  evacuate() gets minutely faster, and
  hopefully multiple obscure bugs are fixed by this.
  
  Revision  Changes    Path
  1.136     +2 -4      fptools/ghc/rts/GC.c
  1.147     +17 -6     fptools/ghc/rts/Schedule.c
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc


Reply via email to