Re: GModule unloading



On 5/23/07, David Nečas (Yeti) <yeti physics muni cz> wrote:
On Tue, May 22, 2007 at 09:32:47AM -0500, Matt Hoosier wrote:
> When a GModule is closed, are any shared libraries which it alone
> required also opportunistically unmapped?
>
> I'm trying to determine whether to mark a module as permanently
> resident. The code which lives directly in the plugin won't contribute
> any static data, but the plugin will depend on some shared libraries
> that introduce some new GTypes.

If the libraries register the types with
g_type_register_static() -- as they most likely do -- you
must not unload them anyway.

That's not really what I'm asking. Suppose there's a regular,
garden-variety shared library intended for any old application to use.
It's DSO is /usr/lib/libboo.so.0.1.2. Boo registers GTypes statically
like any other shared library does.

Now some GModule comes along and happens to dynamically link against
libboo. The application which loads this module does not itself
require libboo. So at the time that the module is dlopen()ed under the
hood, libboo gets dynamically loaded also.

What happens when the GModule is unloaded? Does libboo also get dumped
because the application itself doesn't directly link against
liboo.so.0.1.2, or does it stay resident forever?


Yeti

--
http://gwyddion.net/
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list



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