Check that your ram is firmly seated in it's socket. If the problem still persists you may have a faulty stick of ram in your computer.
There are some free programs you can download from the internet that are designed to check system ram if your computer will stay up and running long enough. Should also mention, 256mb is on the low side for Windows XP. If you can afford to put more in your system will run much more efficiently.