Re: g_*printf() (Was: gtk+-1.1.6 report)
- From: Jeff Garzik <jgarzik pobox com>
- To: gtk-devel-list redhat com
- Subject: Re: g_*printf() (Was: gtk+-1.1.6 report)
- Date: Thu, 10 Dec 1998 10:38:42 -0500 (EST)
Aaron Digulla wrote:
> Quoting Sebastian Wilhelmi (wilhelmi@ira.uka.de):
> > > Along these lines, I'd suggest a "out-of-memory" hook. The standard hook
> > > should abort the program. The reason behind this is that the program
> > > should print a meaningful error when it runs out of memory but most people
> > > don't want to add a check after every invokation of g_printf_new().
> > > (and that should be g_sprintf_new() :-)
> > As mentioned earlier, g_strdup_printf does, what is wanted, as for the
> > hook, glib never returns on memory errors, but simply aborts. As I tried
> > to explain earlier, this is a good thing (i.e. to simply abort and not
> > provide a callback in case of memory shortage; see thread "[gtk-list]
> > 1.1.5 g_timer_new bug!")
> Does that mean one can't write reliable applications with GLib/Gtk ?
heh
Once memory runs low, you can't really guarantee a sane state of any of
your libraries, even if you explicitly handle every single OOM error.
And if your process is running up against a machine limit instead of
a process limit, then you can't guarantee a sane OS state either.
Jeff
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]