xserver: Cleaning up memory allocation functions and macros

Magnus Vigerlöf Magnus.Vigerlof at home.se
Mon Apr 30 13:56:58 PDT 2007

On måndag 30 april 2007, Egbert Eich wrote:
>  > > But they may be handy in situations where a failure is unlikely (so we
>  > > don't want to be bothered with special handling) but if it happens
>  > > need to be handled with a proper error message.
>  > > Driver initialization is a situation that comes to my mind here.
>  >
>  > Using xnf* _is_ special handling.
> Right. But it's not done everywhere where these calls take place to
> avoid having to add special treatment for the unlikely case in
> situations where a failure with a meaningful error message will
> just do.

Imo that's a lazy programmers argument. I can't think of any case where 
crashing the Xserver with only an 'Out of memory' in the log will be a 
meaningful error message for our end-users.

If this have been an argument about an X-client I would probably not be as 
bothered by this, as that would only affect that program. Annoying, yes but 
that wouldn't kill all my other applications that I have running, which would 
be the case we're talking about here. 

I'll go for deprecating these methods (not that many places that uses these 
really) and add proper error handling in as many places I can.


More information about the xorg mailing list