This solution is named 3GB switch
I test it only on windows 7 (32 bits) On 64 bits APB shouldn't run out of memory.
To enable the 3GB switch on Windows Vista™ or Windows 7: Right-click Command Prompt in the Accessories program group of the Start menu. Click Run as Administrator.
At the command prompt, enter "bcdedit /set IncreaseUserVa 3072" without ""
Restart the computer.
To disable the 3GB switch:
Right-click on Command Prompt in the Accessories program group of the Start menu. Click Run as Administrator.
At the command prompt, enter "bcdedit /deletevalue IncreaseUserVa"
Restart the computer.
To enable the 3GB switch on Windows XP: Right-click My Computer. Click Properties.
In the System Properties dialog box, click the Advanced tab.
On the Advanced tab, under Startup and Recovery, click Settings.
In the Startup and Recovery dialog box, under System startup, click Edit. The Windows boot.ini file will be opened in Microsoft® Notepad.
Create a backup copy of the boot.ini file. Note: Boot.ini files may vary from computer to computer.
Select the following line in the boot.ini file:
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Micro soft Windows XP Professional" /fastdetect
Press Ctrl+C to copy the line and then press Ctrl+V to paste it immediately below the original line.
Note: Your text string may be different from the text string in this solution, so be sure to copy the text string from your boot.ini file, and not the text string included here.
Modify the copied line to include “ /3GB”, as shown in the following example:
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Micro soft Windows XP Professional 3GB" /3GB /fastdetect
Note: Do not overwrite any existing lines.
Save and close the boot.ini file.
Click OK to close each dialog box.
Restart your computer.
During startup, select the 3GB option. If you do not select the 3GB option, the system will default to the 2GB total memory setting.
Note: If problems occur during startup, you may try to resolve the issue by updating some of your drivers. However, recall the notice at the beginning of this solutions that note all Windows update or hardware and graphics drivers work with the 3GB switch enabled.