Stack Overflow and Out of Memory error messages tend to relate to low Virtual Memory.
Do you get these messages when just surfing and no other programs running ?
Have you a lot of applications running in startup ?
You can go to Start then Run and type on MSCONFIG, click OK.
In the window that opens up tick Selective Startup then go to the Startup tab.
The more applications that are ticked in there then the slower your pc will boot up and the more memory it will use.
Untick any programs such as office, paint etc. In fact the only ones you really need are the ones relating to your AV and Firewall programs and Systray.exe and possibly Scanregw.exe
After unticking click Apply and then OK and then you will be prompted to reboot.
Hopefully that will stop the messages appearing, if not come back to us