From 898431fe87e36e0749d81422ba7ad473ba660b67 Mon Sep 17 00:00:00 2001 From: ivmai Date: Wed, 16 Sep 2009 08:59:10 +0000 Subject: [PATCH] 2009-09-16 Ivan Maidanski (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. --- ChangeLog | 8 ++++++++ gcj_mlc.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index eb375f7..d2d9d89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ 2009-09-16 Ivan Maidanski + (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. + +2009-09-16 Ivan Maidanski (ivmai125.diff) * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due diff --git a/gcj_mlc.c b/gcj_mlc.c index b4b0f52..7a1a046 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) { -- 2.7.4