Re: avoiding relocations in type registration



On Fri, 21 Apr 2006, Behdad Esfahbod wrote:

On Fri, 21 Apr 2006, Tim Janik wrote:

GType
g_type_register_static_simple (GType             parent_type,
			       const gchar      *type_name,
                              guint16           class_size,
                              GClassInitFunc    class_init,
                              guint16           instance_size,
                              GInstanceInitFunc instance_init,
                              GTypeFlags        flags);

yeah, considerably even since .text is ro and shared.
thanks Matthias, can you commit this please? provided
it's properly tested.

Ok, now that Tim accepted this, can we have a _full version too?
As pointed already, GStreamer users GBaseInitFunc too...  Having
a _full version we can in fact depreate use of the struct
version.

if this is really useful in GStreamer for a lot of cases, you can code
up your own specialized version extremely easily. just look at how
g_type_register_static_simple() is implemented, customize it for gstreamer
needs and put it somewhere next to other gstreamer utility functions.


--behdad
http://behdad.org/

---
ciaoTJ



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