I have seen cases where /tmp is backed by SWAP space....so if you are swapping AND have a lot of /tmp activity it is very possible that running out of SWAP space you would see this message.
If you are out of memory, then you may have very little choice than to reboot. The memory killer may be working, however, it indiscriminately kills off processes of which some might be important.
Another thing is that one (or more) processes have filled up the process table. With no more slots available, you can get that message as well. Your solution here would be a search and destroy operation on the processes causing the condition....assuming you can login. If you cannot login, then reboot is your only alternative.
Finally, of course, the machine software or hardware might be having a serious problem. Thus causing the situation you are describing.
/tmpandps -efwould be a great idea. With such an issue, your machine's services are very likely to go down anyway, which eventually makes the rebooting scenario quite enjoyable.