@Override
  public boolean allocate(long sizeInByte) {
    AtomicBoolean result = new AtomicBoolean(false);
    usedMemoryInBytes.updateAndGet(
        memCost -> {
          if (memCost + sizeInByte > totalMemorySizeInBytes) {
            return memCost;
          }
          result.set(true);
          return memCost + sizeInByte;
        });
    return result.get();
  }
The memory usage in byte of this memory block
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java