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



Sebastian Wilhelmi <wilhelmi ira uka de> writes:
> 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.
> 

This is also for profiling, etc. not just for trying to do memory
parachutes; I think we can afford a couple of function pointers. ;-)

Alex is right I think, you can't get the semantics of try_malloc and
malloc correct if you only have one pointer in the vtable.

Havoc




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