xserver: Cleaning up memory allocation functions and macros

Gabor Gombas gombasg at sztaki.hu
Tue May 1 03:24:12 PDT 2007

On Tue, May 01, 2007 at 12:49:24AM +0300, Daniel Stone wrote:

> There are numerous documented ways to deal with this (e.g. LD_PRELOAD).
> Why are we the only project that feels the need to wrap memory
> allocation, based on a use case no-one can even think of?

Hardly the only one. GNOME uses glib's g_malloc(), OpenLDAP has
ber_memalloc() etc. OTOH these wrappers usually make memory allocation
debugging harder on sane platforms because call chains are longer and
mismatches between wrapped/non-wrapped allocations only crop up when you
want to do debugging using the wrappers so you first have to chase the
bugs in the usage of wrappers before you can go after the original bug
you wanted to track down.


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences

More information about the xorg mailing list