Need to know more about your pc specs before making a comment on how much 'ram' you need.
To me it's possible it's a processor shutdown due to overheating. You can check it by taking a side panel off and making sure the fans are working. Start up a few programs at the same time and listen if the fans get louder. It varies but processors start to shut down if the temps exceed 70C.
If the power supply shuts down to overheating then everything shuts down including fans. If the processor shuts down due to overheating the fans should stay on.