Re: out-of-mem handler

Hi Havoc,

> The only reason I want a callback is to do this:
> while (TRUE)
>  {
>    gpointer p;
>    sleep();
>    p = g_malloc_try();
>    if (p)
>      return p;
> }
> (perhaps with a max number of tries for safety)
> I want this specifically for gnome-session. If other apps do this it's
> obviously very bad, but gnome-session should not be the app to fall
> over if memory runs out.

Yes, sure, but then please add that as gnome_session_malloc() to gnome_session
instead of adding it to glib.

Sebastian Wilhelmi                   |            här ovanför alla molnen           |     är himmlen så förunderligt blå   |

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