[PATCH 02/17] Let calloc handle multiplication

Alan Coopersmith alan.coopersmith at oracle.com
Wed Apr 1 11:36:20 PDT 2015


On 04/ 1/15 02:53 AM, walter harms wrote:
> Why not generally call xnfmalloc/calloc/realloc and exit on OOM ?
> The strategy now seems otherwise.

Because this is the X server and taking down your entire session because
one client made a bad request is very very user unfriendly and will result
in all users screaming their heads off and demanding we revert the change
or they will all go off and use something else and boy we'll be sorry then.

We generally use the xnf* interfaces in places like server setup which aren't
handling client requests and where we can't just continue on handling other
clients and other requests if we fail.

> No problem we me, in the real world i never encountered programs that
> try to handle situations like OOM except doing exit(1).

Clearly you've never looked at sources for robust & reliable software like
databases that can't just say "Oh crap!  Got an error!  Destroying data now!"

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list