[Gc] Patch for handling zero mp passed to GC_init_gcj_malloc
hans.boehm at hp.com
Fri Sep 11 16:41:07 PDT 2009
This looks fine to me, though the corresponding comment in gc_gcj.h also needs adjustment.
I'm actually not sure that the default can really do more than that, other than by consvervatively scanning the object using GC_size() or equivalent. If it's invoked, there is no available bitmap. The conservative scanning code would be an improvement over aborting.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ivan Maidanski
> Sent: Friday, September 11, 2009 2:09 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Patch for handling zero mp passed to GC_init_gcj_malloc
> This small patch (ivmai126.diff) simply substitutes a fake
> mark proc (aborting with a message if GC_debug_gcj_malloc()
> is called) if mp==0 passed to GC_init_gcj_malloc() (ideally
> such mark proc should handle GC_DS_LEN and GC_DS_BITMAP, and
> should abort only in case of GC_DS_PROC, but this requires
> more efforts and code changes).
> ChangeLog entries:
> * 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)
More information about the Gc