in reply to Re: die rather than exit on out-of-memory failure?
in thread die rather than exit on out-of-memory failure?
I had always assumed that when such an error occurred, the OS would simply kill the perl process...
Not necessarily. When a malloc request fails, it simply returns NULL and sets errno to ENOMEM. The memory requesting application may do whatever it sees fit to deal with the situation.
Maybe you were thinking of the case when the OS itself is running out of memory, for which some OSes have emergency code ("OOM killer"), which sacrifices one or more processes to keep the system as a whole alive.
|
|---|