code: private long traverseAndCheck() {
      long sum = 0;
  
      sum += topSize + TOP_FOOT_SIZE;
  
      long q = 0;
      long lastq = 0;
      if (!previousInUse(q))
        throw new AssertionError("Chunk before zeroth chunk is marked as free");
      while (q != top) {
        sum += chunkSize(q);
        if (isInUse(q)) {
          if (findFreeChunk(q))
            throw new AssertionError("Chunk marked as in-use appears in a free structure");
          checkInUseChunk(q);
        } else {
          if (q != designatedVictim && !findFreeChunk(q))
            throw new AssertionError("Chunk marked as free cannot be found in any free structure");
          if (lastq != 0 && !isInUse(lastq))
            throw new AssertionError("Chunk before free chunk is not in-use");
          checkFreeChunk(q);
        }
        lastq = q;
        q = nextChunk(q);
      }
      return sum;
    }
docs: /* Traverse each chunk and check it; return total