Gee, I had that problem too! When my computer posted a warning that the (something) memory (virtual memory?) was dangerously low, it would obligingly turn itself off to free up space!
I tried numerous fixes myself (uninstall, reinstall, etc.) before finally calling McAfee tech support. The really scary thing was that the computer would be moving like molasses in January while all this was going on, and I was totally unprotected from viruses until I got McAfee up and running again.
The problems started after I did a McAfee update. (My memory is hazy on this because it was a few years ago, but I think it was the annual license renewal update.
What did they suggest? Uninstall, reinstall. Call them back if the problem persisted.
I fixed it by doing only Step 1 of what they suggested.
Then I installed AVG Free. Haven't had a problem with THAT turning itself off!