xserver: Cleaning up memory allocation functions and macros

Egbert Eich eich at suse.de
Tue May 1 13:23:24 PDT 2007

Gabor Gombas writes:
 > 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.

True for wrappers. Not for macros though.


More information about the xorg mailing list