code: public static double getSystemMemoryInfo() throws Exception {
          int total = 0;
          Process process = Runtime.getRuntime().exec("tasklist");
          String result = IOUtils.read(process.getInputStream(), Charset.defaultCharset().name());
          String[] results = result.split("\\n");
          for (String str : results) {
              Pattern pattern = Pattern.compile(".*\\s([0-9]{0,},[0-9]+)\\sK.*");
              Matcher matcher = pattern.matcher(str);
              if (matcher.find()) {
                  String memorySizeStr = matcher.group(1).replace(",", "");
                  int memorySize = Integer.parseInt(memorySizeStr);
                  total += memorySize;
              }
          }
          return (double) total / 1024;
      }
docs: 获取windows系统已使用总内存（windows系统可用）
  
  @return 系统已使用的总内存（单位为M）
  @throws Exception
  请参考具体异常信息