Re: Memory allocation troubles
- From: Paul Pogonyshev <pogonyshev gmx net>
- To: Tristan Van Berkom <tristan van berkom gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Memory allocation troubles
- Date: Wed, 20 Oct 2004 19:00:55 +0300
Tristan Van Berkom wrote:
On Wed, 20 Oct 2004 02:00:29 +0300, Paul Pogonyshev <pogonyshev gmx net> wrote:
[...]
Oh, I just remembered that you can use your own malloc() implementation
with Glib/GTK+! So, while this doesn't solve your problem out of the box,
you can do something like this:
This doesn't help,
gtk+ is written with the assumption that its all-or-nothing
(memory available
or abort), so even if your implementation of malloc returns NULL
(which I think is
asserted anyway outside your implementation) then you'd have functions like
g_object_new() segfaulting instead of returning NULL (i.e. someone in
gtk_something_init() will allocate something, fail, access it and segfault).
Did you even care to read the function? It could never return NULL.
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]