docs: public long getFreeMemory() {
      try {
        return (long) mBeanServer.getAttribute(new ObjectName("java.lang", "type", "OperatingSystem"), "FreePhysicalMemorySize");
      } catch (Exception e) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("An exception occurred during memory check", e);
        }
      }
      return -1;
    }