protected StringBuilder addMemorySettings(StringBuilder jvmArguments) {
		String processCountStr = properties.getProperty("grinder.processes", "1");
		// For compatibility, try both.
		int reservedMemoryUnit = properties.getInt("grinder.reserved.memory", 0);
		if (reservedMemoryUnit == 0) {
			reservedMemoryUnit = properties.getInt("grinder.memory.reserved", 300);
		}

		int reservedMemory = Math.max(reservedMemoryUnit, 0) * 1024 * 1024;
		int processCount = NumberUtils.toInt(processCountStr, 1);
		long desirableXmx; // make 500M as default.

		// Make a free memory room size of reservedMemory.
		long free = getAvailableMemory() - reservedMemory;
		long perProcessTotalMemory = Math.max(free / processCount, MIN_PER_PROCESS_MEM_SIZE);
		desirableXmx = (long) (perProcessTotalMemory * 0.5);
		if (this.useXmxLimit) {
			desirableXmx = Math.min(DEFAULT_MAX_XMX_SIZE, desirableXmx);
		}

		jvmArguments.append(" -Xms").append(getMemorySize(desirableXmx)).append("m -Xmx").append(getMemorySize(desirableXmx)).append("m ");
		return jvmArguments;
	}
Build JVM Arguments.

@return generated jvm arguments
ngrinder-core/src/main/java/net/grinder/engine/agent/PropertyBuilder.java