[Gc] Re: Desperately needing GC 7.1
andreast-list at fgznet.ch
Wed Jan 30 13:43:14 PST 2008
Boehm, Hans wrote:
> It sounds like, in light of your insight, maybe the right thing to do here for now is to actually check in a patch that forces the GC_INIT() call for Darwin, i.e. treats it like AIX or Cygwin. If we do that, and disable parallel marking for now, does everything work reliably?
> I think that both of these should be fixed eventually. But it may be a good idea to get 7.1 out in the meantime.
The patch for the moment would only consist of the GC_INIT in
test/test.c, see below.
The documentation already exists since 2003, doc/README.darwin
Darwin/MacOSX Support - December 16, 2003
Important Usage Notes
GC_init() MUST be called before calling any other GC functions. This
is necessary to properly register segments in dynamic libraries. This
call is required even if you code does not use dynamic libraries as the
dyld code handles registering all data segments.
. . .
Unfortunately I do not have much time to follow in deep what's going on
here. A person got severely ill which needs some more effort from my side.
Adding the below to the test case makes it at least work under ppc-32
and x86 Darwin.
RCS file: /cvsroot/bdwgc/bdwgc/tests/test.c,v
retrieving revision 1.12
diff -u -r1.12 test.c
--- tests/test.c 25 Oct 2007 00:41:06 -0000 1.12
+++ tests/test.c 30 Jan 2008 21:36:04 -0000
@@ -65,7 +65,7 @@
/* Call GC_INIT only on platforms on which we think we really need it, */
/* so that we can test automatic initialization on the rest. */
-#if defined(__CYGWIN32__) || defined (_AIX)
+#if defined(__CYGWIN32__) || defined (_AIX) || defined (DARWIN)
# define GC_COND_INIT() GC_INIT()
# define GC_COND_INIT()
More information about the Gc