jitcraft/Heap.cpp
changeset 72 40746ab0a30b
parent 69 dfce0539a77d
     1.1 --- a/jitcraft/Heap.cpp	Sat Jul 14 18:43:34 2012 -0700
     1.2 +++ b/jitcraft/Heap.cpp	Sat Jul 14 21:01:52 2012 -0700
     1.3 @@ -312,19 +312,16 @@
     1.4          while (bits) {
     1.5              uint32 bit = FindRightmostBit(bits);
     1.6              Address object = HeapChunk::FromMarkBit(chunk, markbits, bit);
     1.7 +
     1.8 +            assert(object >= freeStart);
     1.9              if (freeStart != object)
    1.10                  space->markRegionFree(freeStart, object - freeStart);
    1.11 +
    1.12              Object *obj = reinterpret_cast<Object *>(object);
    1.13              freeStart = object + SizeOfObject(obj, obj->map());
    1.14  
    1.15 +            // Since black is 10, we never need to clear the next bit.
    1.16              bits &= ~(1 << bit);
    1.17 -            if (bits == HeapChunk::kMarkBitsPerWord - 1) {
    1.18 -                // This bit is the last bit on this word, so bump up to the
    1.19 -                // next word and exclude the first bit.
    1.20 -                markbits++;
    1.21 -                assert(markbits < markbitsEnd);
    1.22 -                bits = *markbits & ~(1 << 0);
    1.23 -            }
    1.24          }
    1.25          markbits++;
    1.26          bits = *markbits;