Re: [cairo] gobject boxed types
- From: Mathieu Lacage <mathieu lacage sophia inria fr>
- To: Havoc Pennington <hp pobox com>
- Cc: cairo cairographics org, Gtk+ Developers <gtk-devel-list gnome org>, Alexander Larsson <alexl redhat com>
- Subject: Re: [cairo] gobject boxed types
- Date: Tue, 16 Sep 2008 14:07:26 -0700
On Tue, 2008-09-16 at 13:56 -0700, Mathieu Lacage wrote:
> On Tue, 2008-09-16 at 15:45 -0400, Havoc Pennington wrote:
> > Hi,
> >
> > On Mon, Sep 15, 2008 at 7:46 AM, Alexander Larsson <alexl redhat com> wrote:
> > > If you dlopen cairo-glib and use RTLD_LOCAL I think you avoid the symbol
> > > lookup overhead. Maybe this is useful?
> > >
> >
> > It breaks to RTLD_LOCAL something that's also linked to, since you get
> > two copies of the lib (two copies of static variables for example) - I
> > think anyway. So RTLD_LOCAL is only usable for true plugins/modules.
>
> RTLD_LOCAL will not reload the library if it has been loaded already. If
> the library has already been loaded _without_ RTLD_LOCAL (most likely,
> you linked against it explicitely), then, RTLD_LOCAL is ignored, no
> error is reported and the loader will return a handle to the
> previously-loaded library (it increments its refcount) whose symbols are
> RTLD_GLOBAL.
I should have pointed out that the converse is not true. i.e., it is
possible to open a library with RTLD_LOCAL first and promote that to
RTLD_GLOBAL by re-dl_opening it with the RTLD_GLOBAL switch (but once it
is done, you can't go back to RTLD_LOCAL).
This is a bit OT though.
Mathieu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]