It would be pure in languages without manual memory management
It's very normal in a Unix to be allowed to limit total runtime for example.
Edit: @naasking, all good points. Still, isn't the general strategy to ensure memory isn't exhausted, rather than handling such a situation "gracefully", whatever that means? :)
Best to avoid the condition, or design the client side to handle the possibility the resource could be unavailable.