public synchronized MemoryManager getOrCreateMemoryManager(
      String name, long sizeInBytes, boolean enabled) {
    return children.compute(
        name,
        (managerName, manager) -> {
          if (sizeInBytes < 0) {
            LOGGER.warn("getOrCreateMemoryManager {}: sizeInBytes should be positive", name);
            return null;
          }
          if (manager != null) {
            LOGGER.debug(
                "getMemoryManager: memory manager {} already exists, it's size is {}, enabled is {}",
                managerName,
                manager.getTotalMemorySizeInBytes(),
                manager.isEnable());
            return manager;
          } else {
            if (this.enabled
                && sizeInBytes + this.allocatedMemorySizeInBytes > this.totalMemorySizeInBytes) {
              LOGGER.warn(
                  "getOrCreateMemoryManager failed: total memory size {} bytes is less than allocated memory size {} bytes",
                  sizeInBytes,
                  allocatedMemorySizeInBytes);
              return null;
            }
            allocatedMemorySizeInBytes += sizeInBytes;
            return new MemoryManager(name, this, sizeInBytes, enabled);
          }
        });
  }
Try to create a new memory manager with specified name and total memory size in bytes, then put
it into children map. NOTICE: if there are same name memory manager, it will return the
existing one instead of creating a new one or update the existing one.

@param name the name of memory manager
@param sizeInBytes the total memory size in bytes of memory manager
@param enabled whether memory management is enabled
@return the memory manager
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java