private void checkExpansion() {
    if (size < safetyPiles.length) {
      return;
    }
    int[] newSafetyPiles = new int[safetyPiles.length << 1];
    System.arraycopy(safetyPiles, 0, newSafetyPiles, 0, size);
    safetyPiles = newSafetyPiles;
  }
Get the safe index.

@return the index of the first element that cannot be evicted. in other words, elements whose
    index are <b>less than</b> the return value can be evicted.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/transformation/dag/memory/SafetyLine.java