1) Go to "Control Panel -> Add/Remove Programs -> Windows Setup -> System Tools -> Add System Monitor".
2) Run System Monitor.
3) Click "Edit -> Add item -> Memory Manager -> Swapfile Size".
4) Clock "Ok".
5) Leave "System Monitor" open and go about using your computer as you normally do (run the game that is causing it to lock up).
6) After you run the game, and before it locks up, exit it and try to check the "Peak Value" for your Swapfile size. The size is given in bytes so you have to divide it by 1024 two times to get megabytes.
7) Now go to "Control Panel -> System -> Performance -> Virtual Memory" and click on "Let me specify my own settings". Set the minimum value to your number from step 6.
Windows will control your swap file again, but you will notice it uses your "Min" value.
This means it will not need to expand the swap file (for the most part) during usage or heavy gaming. But, unlike if you set a "Max", if you need more virtual memory for some reason it will let the swap file grow.
**Edit : Lol didn't notice it was an old thread either.