[Gc] GC_register_dynamic_libraries on FreeBSD

Boehm, Hans hans.boehm at hp.com
Wed Jan 26 18:45:49 PST 2011

Sorry about the delay.

No, I don't think that needs to be done repeatedly.  I initially thought it would be OK to just register the main data segment as permanent, non-temporary roots.  And that may be OK.  But I'm not sure we'll consistently take that code if we have an executable that initially links against no dynamic libraries, but then calls dlopen.  Is that even possible?  Maybe it's safer just to cache the values as you suggest and leave the rest of this alone.


From: gc-bounces at linux.hpl.hp.com [mailto:gc-bounces at linux.hpl.hp.com] On Behalf Of Ivan Maidanski
Sent: Monday, January 17, 2011 1:47 PM
To: gc at linux.hpl.hp.com
Subject: [Gc] GC_register_dynamic_libraries on FreeBSD

Hi Hans,

In dyn_load.c, we have GC_register_map_entries and GC_register_dynamic_libraries_dl_iterate_phdr() which could be called on each GC cycle, and these functions use DATASTART/END which are defined as GC_FreeBSDGetDataStart() or GC_find_limit() calls under FreeBSD on some architectures.
The question is: should we really need to call GC_FreeBSDGetDataStart, GC_find_limit every GC? (If not, we could just call them once and cache the values.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20110127/bb566804/attachment.htm

More information about the Gc mailing list