Skip to content
  • Simon Marlow's avatar
    [project @ 2002-07-10 09:28:54 by simonmar] · f477a85c
    Simon Marlow authored
    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.
    f477a85c