code: private void checkSmallBin(int index) {
      long h = smallBins[index];
  
      boolean empty = (smallMap & (1 << index)) == 0;
      if (h == -1 && !empty) {
        throw new AssertionError("Small bin chain " + index + " is marked as occupied but has an invalid head pointer");
      }
      if (!empty) {
        long p = h;
        do {
          long size = chunkSize(p);
          /* each chunk claims to be free */
          checkFreeChunk(p);
          /* chunk belongs in bin */
          if (smallBinIndex(size) != index)
            throw new AssertionError("Chunk " + p + " is the wrong size to be in bin " + index);
          if (backward(p) != p && chunkSize(backward(p)) != chunkSize(p))
            throw new AssertionError("Chunk " + p + " is the linked to a chunk of the wrong size");
          /* chunk is followed by an inuse chunk */
          checkInUseChunk(nextChunk(p));
  
          p = backward(p);
        } while (p != h);
      }
    }
docs: /*  Check all the chunks in a smallbin.