+2008-02-06 Hans Boehm <Hans.Boehm@hp.com> (mostly from Henning Makholm)
+
+ * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
+ Add GC_push_typed_structures() to push GC_ext_descriptors.
+
2008-01-31 Hans Boehm <Hans.Boehm@hp.com> (mostly from Andreas Tobler)
* tests/test.c: Call GC_INIT for DARWIN; test system type using
# ifdef THREADS
extern void GC_push_thread_structures (void);
# endif
+ extern void (*GC_push_typed_structures) (void);
+ /* A pointer such that we can avoid linking in */
+ /* the typed allocation support if unused. */
extern void (*GC_start_call_back) (void);
/* Called at start of full collections. */
/* Not called if 0. Called with allocation */
# endif /* !THREADS */
}
+void (*GC_push_typed_structures) (void) = NULL;
+
/*
* Push GC internal roots. Only called if there is some reason to believe
* these would not otherwise get registered.
# if defined(THREADS)
GC_push_thread_structures();
# endif
+ if( GC_push_typed_structures )
+ GC_push_typed_structures();
}
#ifdef THREAD_LOCAL_ALLOC
int GC_typed_mark_proc_index; /* Indices of my mark */
int GC_array_mark_proc_index; /* procedures. */
+static void GC_push_typed_structures_proc (void)
+{
+ GC_push_all((ptr_t)&GC_ext_descriptors, (ptr_t)&GC_ext_descriptors + sizeof(word));
+}
+
/* Add a multiword bitmap to GC_ext_descriptors arrays. Return */
/* starting index. */
/* Returns -1 on failure. */
size_t new_size;
word ed_size = GC_ed_size;
- UNLOCK();
if (ed_size == 0) {
+ GC_push_typed_structures = GC_push_typed_structures_proc;
+ UNLOCK();
new_size = ED_INITIAL_SIZE;
} else {
+ UNLOCK();
new_size = 2 * ed_size;
if (new_size > MAX_ENV) return(-1);
}