summaryrefslogtreecommitdiff
path: root/obj_map.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-20 11:31:14 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commitad269687a9cb0d834eed41ad67c9c4acbad205c9 (patch)
treea0260f0f9cbd1b1e2b887acfc42ec4686c3ae644 /obj_map.c
parentc2dddb53a10205f986ae782e5b1e7105f0ea80c5 (diff)
2011-03-20 Ivan Maidanski <ivmai@mail.ru>
* blacklst.c (GC_bl_init_no_interiors): New function (the code moved from GC_bl_init). * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless GC_all_interior_pointers mode; remove unnecessarily parameter cast for GC_scratch_alloc call. * include/private/gc_priv.h (GC_bl_init): Move the function declaration to misc.c file. * misc.c (GC_bl_init_no_interiors): Add a prototype. * misc.c (GC_set_all_interior_pointers): Allow values other than 0 and 1; allow altering GC_set_all_interior_pointers value even after GC initialization. * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and GC_modws_valid_offsets if GC_all_interior_pointers is off. * misc.c (GC_init): Don't call GC_initialize_offsets() unless GC_all_interior_pointers mode.
Diffstat (limited to 'obj_map.c')
-rw-r--r--obj_map.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/obj_map.c b/obj_map.c
index 8bd0993..082a0aa 100644
--- a/obj_map.c
+++ b/obj_map.c
@@ -82,5 +82,9 @@ GC_INNER void GC_initialize_offsets(void)
if (GC_all_interior_pointers) {
for (i = 0; i < VALID_OFFSET_SZ; ++i)
GC_valid_offsets[i] = TRUE;
+ } else {
+ BZERO(GC_valid_offsets, sizeof(GC_valid_offsets));
+ for (i = 0; i < sizeof(word); ++i)
+ GC_modws_valid_offsets[i] = FALSE;
}
}