Memory Tuning for Large Applications

OutOfMemory errors can occur when you migrate, compile, or build a large PowerBuilder .NET application. To prevent these errors, you can turn on 3G memory support for your operating system.

You also must make the .NET Framework build and compile executables large address aware.

  1. Turn on the /3GB switch for your operating system:
    • On Windows XP, add the "/3GB" switch immediately after the "/fastdetect" switch in the system boot.ini file.

      See http://www.fmepedia.com/index.php/How_do_I_turn_on_the_3GB_Switch or http://technet.microsoft.com/en-us/library/bb124810(EXCHG.65).aspx for information on editing the boot.ini file.

    • On Windows Vista or Windows 7, right-click Command Prompt in the Accessories program group of the Start menu, select Run as Administrator, then enter "bcdedit /set IncreaseUserVa 3072" and restart the computer.

      You can later remove the /3GB switch by entering "bcdedit /deletevalue IncreaseUserVa" in the same Command Prompt dialog box and restarting the computer.

  2. Download and install a tool to enable applications to be large address aware.
  3. Use the tool to enable msbuild.exe and csc.exe to be large address aware.
    These build and compile executables are under C:\Windows\Microsoft.NET\Framework, in the subdirectory for the current version. You must enable the executables in separate operations.