private short maxAppendableSegmentSize() {
    return (short)
        (pageBuffer.limit() - SchemaFileConfig.SEG_OFF_DIG * (memberNum + 1) - spareOffset);
  }
Allocate a new segment to extend specified segment, modify cache map and list.

<p><b> The new segment could be allocated from spare space or rearranged space.</b>

@param seg original segment instance
@param segIdx original segment index
@param newSize target segment size
@return reallocated segment instance, null if no enough spare space
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/SegmentedPage.java