From owner-freebsd-ports Wed Jul 21 10:11: 9 1999 Delivered-To: freebsd-ports@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id B1E4214CB6 for ; Wed, 21 Jul 1999 10:10:56 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id KAA04836; Wed, 21 Jul 1999 10:09:38 -0700 (PDT) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id KAA71653; Wed, 21 Jul 1999 10:09:37 -0700 (PDT) (envelope-from jdp@polstra.com) Date: Wed, 21 Jul 1999 10:09:37 -0700 (PDT) Message-Id: <199907211709.KAA71653@vashon.polstra.com> To: marko@ki.informatik.uni-frankfurt.de Subject: Re: boehm-gc and dynamic library support In-Reply-To: <86n1y0faot.fsf@king.ki.informatik.uni-frankfurt.de> Organization: Polstra & Co., Seattle, WA Cc: ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article <86n1y0faot.fsf@king.ki.informatik.uni-frankfurt.de>, Marko Schuetz 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