xserver: Cleaning up memory allocation functions and macros
Magnus.Vigerlof at home.se
Mon Apr 30 13:20:48 PDT 2007
On söndag 29 april 2007, Keith Packard wrote:
> On Sat, 2007-04-28 at 22:58 -0400, Eamon Walsh wrote:
> > Also, what about ALLOCATE_LOCAL and DEALLOCATE_LOCAL? Are there any
> > target systems out there that still don't have a working alloca?
> From what we've been able to determine, *no* systems have a working
> alloca as attempts to allocate 'way too much' memory are not handled
> correctly. It may be easier to simply give up on this optimization
> rather than carefully audit every single present and future usage
> against using values provided by the user in any alloca calls.
I don't think these macros has been tested on anything that doesn't have
alloca . So it's probably best to go through these while I'm at it.
If performance will become an issue it's always possible to do as in ,
having a fixed size local buffer that covers most cases and do the memory
allocation for the exceptions.
 +1125 ./hw/dmx/dmxextension.c
 +1325 ./render/render.c
More information about the xorg