protected final Address makeFreeListFromLiveBits(Address block, int sizeClass) throws InlinePragma { Extent cellBytes = Extent.fromIntSignExtend(cellSize[sizeClass]); Address cellCursor = block.plus(blockHeaderSize[sizeClass]); Extent blockSize = Extent.fromIntSignExtend(BlockAllocator.blockSize(blockSizeClass[sizeClass])); Address end = block.plus(blockSize); Address nextFree = Address.zero(); Address nextCellCursor = cellCursor.plus(cellBytes); Address liveCursor = alignToLiveStride(cellCursor); Address liveWordCursor = getLiveWordAddress(liveCursor); boolean isLive = false; while (liveCursor.LT(end)) { Word live = liveWordCursor.loadWord(); if (!live.isZero()) { for (int i = 0; i < BITS_IN_WORD; i++) { if (!(live.and(Word.one().lsh(i)).isZero())) isLive = true; liveCursor = liveCursor.plus(BYTES_PER_LIVE_BIT); if (liveCursor.GE(nextCellCursor)) { if (!isLive) { free(cellCursor, block, sizeClass, nextFree); nextFree = cellCursor; } cellCursor = nextCellCursor; nextCellCursor = nextCellCursor.plus(cellBytes); isLive = false; } } } else { liveCursor = liveCursor.plus(BYTES_PER_LIVE_WORD); while (liveCursor.GE(nextCellCursor)) {  if (!isLive) { free(cellCursor, block, sizeClass, nextFree); nextFree = cellCursor; } cellCursor = nextCellCursor; nextCellCursor = nextCellCursor.plus(cellBytes); isLive = false; } } liveWordCursor = liveWordCursor.plus(BYTES_IN_WORD);
protected final Address makeFreeListFromLiveBits(Address block, int sizeClass) { if (Assert.VERIFY_ASSERTIONS) { Assert._assert(maintainSideBitmap());
  protected final Address makeFreeListFromLiveBits(Address block,                                                       int sizeClass)      throws InlinePragma {    Extent cellBytes = Extent.fromIntSignExtend(cellSize[sizeClass]);    Address cellCursor = block.plus(blockHeaderSize[sizeClass]);    Extent blockSize = Extent.fromIntSignExtend(BlockAllocator.blockSize(blockSizeClass[sizeClass]));    Address end = block.plus(blockSize);    Address nextFree = Address.zero();    Address nextCellCursor = cellCursor.plus(cellBytes);    Address liveCursor = alignToLiveStride(cellCursor);    Address liveWordCursor = getLiveWordAddress(liveCursor);    boolean isLive = false;    while (liveCursor.LT(end)) {      Word live = liveWordCursor.loadWord();      if (!live.isZero()) {        for (int i = 0; i < BITS_IN_WORD; i++) {          if (!(live.and(Word.one().lsh(i)).isZero()))            isLive = true;          liveCursor = liveCursor.plus(BYTES_PER_LIVE_BIT);          if (liveCursor.GE(nextCellCursor)) {            if (!isLive) {              free(cellCursor, block, sizeClass, nextFree);              nextFree = cellCursor;            }            cellCursor = nextCellCursor;            nextCellCursor = nextCellCursor.plus(cellBytes);            isLive = false;          }        }      } else {        liveCursor = liveCursor.plus(BYTES_PER_LIVE_WORD);        while (liveCursor.GE(nextCellCursor)) {          // while (nextCellCursor.LT(liveCursor)) {          if (!isLive) {            free(cellCursor, block, sizeClass, nextFree);            nextFree = cellCursor;          }          cellCursor = nextCellCursor;          nextCellCursor = nextCellCursor.plus(cellBytes);          isLive = false;        }      }      liveWordCursor = liveWordCursor.plus(BYTES_IN_WORD);    }    return nextFree;  }