Re: memory profiling (was calling g_malloc & co via a vtable)



Darin Adler <darin eazel com> writes:

> What do the Gtk+ maintainers think about a policy where we provide the
> additional code to free these data structures on exit, using g_atexit? I'd
> be happy to supply patches for this as well at some point.

Not using g_atexit. Basically, using atexit is evil, because the
order of various atexit() calls is undefined, because it interacts
badly with fork(), etc.

I'd like to get rid of the current atexit that GDK installs.

We could probably add a call to free the free lists,
(g_flush_unused()) or something like that.

We could also add some sort of gtk_uninit(), though it would be
a pain to get right. 

(It's probably easiest to do in the context of getting rid of the
single-display restriction of GDK ... the same global variables would
be the problem in many of the cases, and you can attach some of them
as object data on a display object.)

Regards,
                                        Owen




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