[PATCH 2/6] xserver: Possible memory leaks, stricter option checks, UnInit (NewInputDeviceRequest)

Magnus Vigerlöf Magnus.Vigerlof at home.se
Fri Mar 30 15:50:58 PDT 2007

On Saturday 31 March 2007 00:24, Alan Coopersmith wrote:
> Magnus Vigerlöf wrote:
> > Can the xserver really start using the standard C library methods? I'm
> > not so sure as the Xalloc do some really nifty things (mmap) for big
> > allocations, and I do think they are needed to be kept like that.
> That's only in the os/xalloc.c code which doesn't seem to be actually used.
> (I don't see INTERNAL_MALLOC defined anywhere, so it should be using the
>   os/utils.c version, which is a much more boring wrapper.)
> The imake configs had an option to enable it, but it was off by default
> and it appears no one ever copied over the option to enable to the
> autoconf.

My bad.. Didn't reflect on where it was defined when I traced the hotplug 
memory leaks earlier (it was indeed the ones defined in utils.c).

So a major cleanup would be in order to remove this dead code? (this grows by 
the minute :) What about the xnf*-functions which calls FatalError if no 
memory was returned (NonFail)? Skip them for the time being? It's a pretty 
big job to update the source if they should be eliminated as well as more 
checks are needed for a proper error handling.

 Magnus V

More information about the xorg mailing list