Re: Memory allocation: abort on failure?

W. Borgert wrote:

on the Ethereal mailing list is a discussion on how to get rid of
glib in Ethereal
An explanation on why people don't like glib is given by Guy Harris
Note, that Ethereal currently can be build with either Gtk+1/glib1
or Gtk+2/glib2, as some platforms seem to have problems with
Gtk+2/glib2.  Could someone explain, whether the problem exists
with current glib versions?

Cheers, W. Borgert


To answer :
It is certainly sound to have as few dependencies as possible in a project, as long as this does not imply reinventing the wheel, but if Ethereal people did not know that, they probably wouldn't have acheived such a nice piece of software :-)

To answer :
Since glib 2.8 there is a g_try_{malloc,malloc0,realloc} familly of functions that may be used. Moreover, remember that (at least since glib 2.0) the memory management function of the glib you are using are provided as default that can be overriden at your convenience using the g_mem_set_vtable function, plsease refere to for more information.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]