What might be happening is that your ram may need to be freed up. Although this is probably not the case with Windows XP, sometimes information is stored in the ram for a previous program and it is not removed if the program encounters a problem. Therefore, if the rem is not released, the computer begins to use the pagefile.sys as a swapfile.
If you are concerned about not booting or shuting your computer off, then there are many programs including TweakXP and Release Ram which will manage your ram for you. You can just specify how much ram to release, or let the program do it itself.
Having a huge amount of ram will not solve the problem, especially if you have a slow processor or a lousy video card. Remember, ram operates at the processor speed. You might need to increse your swapfileif you do not have a large amount of ram. I believe the swapfile should be three times the size of your ram.