private void reAllocateMemoryAccordingToRatio(double ratio) {
    // first increase the total memory size of this memory manager
    this.totalMemorySizeInBytes *= ratio;
    // then re-allocate memory for all memory blocks
    for (IMemoryBlock block : allocatedMemoryBlocks.values()) {
      block.setTotalMemorySizeInBytes((long) (block.getTotalMemorySizeInBytes() * ratio));
    }
    // finally re-allocate memory for all child memory managers
    for (Map.Entry<String, MemoryManager> entry : children.entrySet()) {
      entry.getValue().reAllocateMemoryAccordingToRatio(ratio);
    }
  }
Re-allocate memory according to ratio

@param ratio the ratio of new total memory size to old total memory size
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/MemoryManager.java