summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-02-07 01:58:28 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:42 +0200
commit0ca3e850f03fa5b4e1ac333b3f67908e7b63b451 (patch)
treeea05f56d1a3c7526e8feae25e1633638199e5d33 /typd_mlc.c
parent430345552d952cebcde227fef2adaa6b574afd08 (diff)
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.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index 744d938..ae529d3 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -97,6 +97,11 @@ size_t GC_avail_descr = 0; /* Next available slot. */
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. */
@@ -116,10 +121,12 @@ signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
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);
}