It is not memory. That is part of the Recovery HD in a sense.
When you go into recovery mode it expands and mounts the "BaseSystem.dmg" and calls that volume the "Mac OS X Base System". You will only see this while booted into recovery mode. That is the volume that is running while in recovery.
I'm hesitant to offer any suggestions with no backup and not knowing whether or not you have stuff on there that you cannot afford to lose...
If it were mine, I would likely just reinstall the OS via recovery. This should only install the OS over the top of what you have without affecting the user accounts or data on the machine. Do not erase, format, partition, etc. You are only installing to the existing Macintosh HD partition. I would run a repair permissions and a verify drive first.
You could also, install OS X to an external drive, boot to that external, move the stuff you need from the internal drive to the external - then totally wipe the internal and start over with it. You've got a few hours work ahead of you.
For both you and the wife - never click ok on a web browser pop up like that. When you run into one of those, you need to force quit the browser - turn off wifi or disconnect the ethernet cable - then start the browser and close the affected tab of the browser.