Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 1999 10:09:37 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        marko@ki.informatik.uni-frankfurt.de
Cc:        ports@freebsd.org
Subject:   Re: boehm-gc and dynamic library support
Message-ID:  <199907211709.KAA71653@vashon.polstra.com>
In-Reply-To: <86n1y0faot.fsf@king.ki.informatik.uni-frankfurt.de>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <86n1y0faot.fsf@king.ki.informatik.uni-frankfurt.de>,
Marko Schuetz  <marko@ki.informatik.uni-frankfurt.de> wrote:
> The boehm-gc port does currently not support dynamic libraries. From a
> quick glance at dyn_load.c I see that there might be two ways of
> registering dynamic libraries. One seems to be using procfs the other
> using _DYNAMIC etc.
> 
> Has anyone (likely more knowledgeable about this than I) looked into
> this or maybe already done this?
> 
> If not, which of these to approaches seems cleaner/more
> efficient/easier to implement??

I glanced at it briefly a couple of years ago.  As I recall, the
_DYNAMIC method used knowledge of the dynamic linker's private data
structures.  That's pretty unclean, obviously, since those data
structures changes from time to time.

The procfs approach would be cleaner in that sense.  How often does
the information have to be updated?  Using procfs might not be very
efficient if it had to be read frequently.

Also, I think you might easily get bogus results from using procfs.
Does the GC want to know only about shared libraries, or does it
want to know about all writable segments in general?  In some cases
it probably couldn't distinguish between a shared library and a
mmapped segment using procfs.

I think the best solution would be to add a nice API to the dynamic
linker for getting information about the loaded shared libraries.  It
wouldn't be hard to implement.  As always, the hard part would be
designing a good API for it.

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "No matter how cynical I get, I just can't keep up."        -- Nora Ephron


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907211709.KAA71653>