Upgrading your ram would be a very good idea, 504Mb of ram isn't very much at all and it is incredibly cheap to upgrade these days (I sold 2*1Gb sticks of ram recently for 45NZD/25USD) and its one of the easiest bits in a computer to change out (though you may want a friend to help you out with it if you're not sure).
I *think* that error is a result of your page file getting filled, but I can't recall how to change that on Xp, nor whether it's a good idea to increase it (I have page file disabled).
Here is a quick explanation of what I'm talking about
HereHope that helps, my advice would definitely be to get at least 1gb of ram if not more