Re: [patch] calling g_malloc & co via a vtable



Hi Alexander,

> > But if you are using the callback, then you know the concrete
> > GMemFunctions implementation (otherwise there is no callback) and this
> > implementation then has to provide that facility for you. What does glib
> > have to do with that?
> 
> Yes, but other code that is unaware of my callback might use
> g_try_malloc(), and I want it to do something meaningful.

Then set a global flag ("We are in recovery now: return NULL, if no memory can
be allocated immediatly") to reflect that. I still don't see why someting,
which will never work (I mean the out-of-mem-callback: I've never seen it
working and I doubt, I ever will), should make glib bloated.

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi ira uka de           |     är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi   |




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