summaryrefslogtreecommitdiff
path: root/mark.c
diff options
context:
space:
mode:
Diffstat (limited to 'mark.c')
-rw-r--r--mark.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/mark.c b/mark.c
index 4d75047..d8752ce 100644
--- a/mark.c
+++ b/mark.c
@@ -434,13 +434,7 @@ GC_bool GC_mark_stack_empty()
/* for the large object. */
/* - just return current if it does not point to a large object. */
/*ARGSUSED*/
-# ifdef PRINT_BLACK_LIST
- ptr_t GC_find_start(current, hhdr, new_hdr_p, source)
- ptr_t source;
-# else
- ptr_t GC_find_start(current, hhdr, new_hdr_p)
-# define source 0
-# endif
+ptr_t GC_find_start(current, hhdr, new_hdr_p)
register ptr_t current;
register hdr *hhdr, **new_hdr_p;
{
@@ -468,7 +462,6 @@ register hdr *hhdr, **new_hdr_p;
} else {
return(current);
}
-# undef source
}
void GC_invalidate_mark_state()
@@ -838,7 +831,7 @@ long GC_markers = 2; /* Normally changed by thread-library- */
/* -specific code. */
/* Mark using the local mark stack until the global mark stack is empty */
-/* and ther are no active workers. Update GC_first_nonempty to reflect */
+/* and there are no active workers. Update GC_first_nonempty to reflect */
/* progress. */
/* Caller does not hold mark lock. */
/* Caller has already incremented GC_helper_count. We decrement it, */
@@ -918,7 +911,7 @@ void GC_mark_local(mse *local_mark_stack, int id)
return;
}
/* else there's something on the stack again, or */
- /* another help may push something. */
+ /* another helper may push something. */
GC_active_count++;
GC_ASSERT(GC_active_count > 0);
GC_release_mark_lock();
@@ -950,8 +943,10 @@ void GC_do_parallel_mark()
GC_acquire_mark_lock();
GC_ASSERT(I_HOLD_LOCK());
- GC_ASSERT(!GC_help_wanted);
- GC_ASSERT(GC_active_count == 0);
+ /* This could be a GC_ASSERT, but it seems safer to keep it on */
+ /* all the time, especially since it's cheap. */
+ if (GC_help_wanted || GC_active_count != 0 || GC_helper_count != 0)
+ ABORT("Tried to start parallel mark in bad state");
# ifdef PRINTSTATS
GC_printf1("Starting marking for mark phase number %lu\n",
(unsigned long)GC_mark_no);
@@ -1374,11 +1369,11 @@ ptr_t cold_gc_frame;
return;
}
# ifdef STACK_GROWS_DOWN
- GC_push_all_eager(bottom, cold_gc_frame);
GC_push_all(cold_gc_frame - sizeof(ptr_t), top);
+ GC_push_all_eager(bottom, cold_gc_frame);
# else /* STACK_GROWS_UP */
- GC_push_all_eager(cold_gc_frame, top);
GC_push_all(bottom, cold_gc_frame + sizeof(ptr_t));
+ GC_push_all_eager(cold_gc_frame, top);
# endif /* STACK_GROWS_UP */
} else {
GC_push_all_eager(bottom, top);