glib g_malloc() and ram.



Hi,
  I am converting a bunch of tools to a shared library, to make a long story short I looked at
glib to see what it does when malloc() fails in the library, it seems from tracing g_malloc()
that it calls g_logv() through g_error() at line 179 of gmem.c in glib-1.2.8.

>From what I can see this only reports the error, and then glib assumes that the allocation
was ok... Am I wrong or is this the desired treatment for an out of memory case in the shared lib?



Use what talents you possess: the woods would be very silent if no birds
sang there except those that sang best.
-- Henry Van Dyke


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