summaryrefslogtreecommitdiff
path: root/gcj_mlc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-09-16 08:59:10 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:46 +0400
commit898431fe87e36e0749d81422ba7ad473ba660b67 (patch)
treeea379499d58962315fe01bc15b5858583635291c /gcj_mlc.c
parentb25423e5c288b45f1f1878fe16b6c1e124035ae3 (diff)
downloadbdwgc-898431fe87e36e0749d81422ba7ad473ba660b67.tar.gz
2009-09-16 Ivan Maidanski <ivmai@mail.ru>
(ivmai126.diff) * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function. * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply GC_gcj_fake_mark_proc (aborting with the appropriate message) instead.
Diffstat (limited to 'gcj_mlc.c')
-rw-r--r--gcj_mlc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcj_mlc.c b/gcj_mlc.c
index b4b0f522..7a1a0462 100644
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -50,6 +50,16 @@ int GC_gcj_debug_kind; /* The kind of objects that is always marked */
ptr_t * GC_gcjobjfreelist;
ptr_t * GC_gcjdebugobjfreelist;
+/*ARGSUSED*/
+STATIC struct GC_ms_entry * GC_gcj_fake_mark_proc(word * addr,
+ struct GC_ms_entry *mark_stack_ptr,
+ struct GC_ms_entry *mark_stack_limit,
+ word env)
+{
+ ABORT("No client gcj mark proc is specified");
+ return mark_stack_ptr;
+}
+
/* Caller does not hold allocation lock. */
GC_API void GC_CALL GC_init_gcj_malloc(int mp_index,
void * /* really GC_mark_proc */mp)
@@ -57,6 +67,9 @@ GC_API void GC_CALL GC_init_gcj_malloc(int mp_index,
GC_bool ignore_gcj_info;
DCL_LOCK_STATE;
+ if (mp == 0) /* In case GC_DS_PROC is unused. */
+ mp = (void *)(word)GC_gcj_fake_mark_proc;
+
GC_init(); /* In case it's not already done. */
LOCK();
if (GC_gcj_malloc_initialized) {