I've got mixed feelings about this one.

On a PDP-11, malloc() fails pretty often, and you've generally got an idea of what to do to handle it.

On a modern desktop if malloc() starts failing you're in deep shit. You've filled up RAM, *and* swap, and paged out everything that can be paged out. On a system with a swapfile instead of a partition you've probably also filled up hour hard disk. By the time malloc fails you're out of sump water and you're trying to suck the sweat out of your jockstrap.

Or else you've got a totally corrupt heap and you've probably already scribbled all over yourself.

Of all the horrible things I've seen in shared libraries, on a scale of 1 - 10, I'd call this about a 2 or a 3.

Reply via email to