public synchronized PipeMemoryBlock forceAllocateIfSufficient(
      long sizeInBytes, float usedThreshold) {
    if (usedThreshold < 0.0f || usedThreshold > 1.0f) {
      return null;
    }

    if (!PIPE_MEMORY_MANAGEMENT_ENABLED) {
      return new PipeMemoryBlock(sizeInBytes);
    }

    if (sizeInBytes == 0) {
      return registerMemoryBlock(0);
    }

    if ((float) (memoryBlock.getUsedMemoryInBytes() + sizeInBytes)
        <= getTotalNonFloatingMemorySizeInBytes() * usedThreshold) {
      return forceAllocate(sizeInBytes);
    }

    return null;
  }
Allocate a {@link PipeMemoryBlock} for pipe only if memory used after allocation is less than
the specified threshold.

@param sizeInBytes size of memory needed to allocate
@param usedThreshold proportion of memory used, ranged from 0.0 to 1.0
@return {@code null} if the proportion of memory used after allocation exceeds {@code
    usedThreshold}. Will return a memory block otherwise.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java