public static ILaunchConfigurationWorkingCopy setMemory(ILaunchConfigurationWorkingCopy wc,
			String memory) throws CoreException {
		if (memory != null) {
			String vmArgs = wc.getAttribute(ATTR_VM_ARGUMENTS, "");
			if (!vmArgs.isEmpty()) {
				vmArgs += " ";
			}
			wc.setAttribute(ATTR_VM_ARGUMENTS, vmArgs + "-Xmx" + memory);
		}
		return wc;
	}
Appends the maximum Java heap size (-Xmx) to the VM arguments in the provided working copy.

@param memory The desired maximum Java heap size.  Could be null if the default is to be 
  used.
@param wc The launch configuration working copy to modify.
@return The modified working copy.
@throws CoreException if there was an Eclipse-related issue appending the VM argument.

@see #ATTR_VM_ARGUMENTS
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidraprojectcreator/utils/GhidraLaunchUtils.java