code: public static String getMemoryInfo(final Unit unit) {
  		final long[] memory = getMemoryInfo();
  
  		for (final Type type : Type.values()) {
  			memory[type.ordinal()] /= unit.getDenominator();
  		}
  
  		final StringBuilder sb = new StringBuilder(100);
  		sb.append("Memory (free/total/max): ");
  		sb.append(memory[Type.FREE.ordinal()]);
  		sb.append(unit.getUnitString());
  		sb.append("/");
  		sb.append(memory[Type.TOTAL.ordinal()]);
  		sb.append(unit.getUnitString());
  		sb.append("/");
  		sb.append(memory[Type.MAX.ordinal()]);
  		sb.append(unit.getUnitString());
  		return sb.toString();
  	}
docs: Get information about the current memory status of the JVM.
  
  @param unit
  used for formatting. Valid values are:
  <ul>
  <li>{@link Unit#BYTES}</li>
  <li>{@link Unit#KILOBYTES}</li>
  <li>{@link Unit#KIBIBYTES}</li>
  <li>{@link Unit#MEGABYTES}</li>
  <li>{@link Unit#MEBIBYTES}</li>
  </ul>
  If no value is given, {@link Unit#BYTES} will be used. No decimal place will be
  calculated, plain integer values are returned.
  @return a string with the current memory information