public static long getStringMem(String str) {
    // wide char (2 bytes each) and 64B String overhead
    return str.length() * 2L + 64L;
  }
Function for getting the memory size of the given string.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/MemUtils.java