[Gc] Suggested enhancements for improved support of embeddable
jean.claude.beaudoin at gmail.com
Tue Jun 19 20:50:41 PDT 2012
As a user of this GC in an embeddable context (MKCL) I would like
to suggest the following enhancements to the GC's API:
1) On platforms using signals to implement the stop-world/resume-world
machinery, the choice of specific signal for SIG_SUSPEND and
SIG_THR_RESTART should be configurable at GC_init() time instead
of GC library compile time. This could be done through two simple
external functions like:
plus two simple accessors used inside the GC code.
2) The embedding context needs to intercept any call to
function abort() or function exit() that the GC may do. A pair of
callback hooks would be very useful to achieve this.
The API for this could be something like:
typedef void (*GC_exit_func)(const int status);
void GC_set_exit_func(GC_exit_func fn);
typedef void (*GC_abort_func)(const char * const msg);
void GC_set_abort_func(GC_abort_func fn);
All of this can be quite easily implemented in a few lines
of code. I could provide you with a copy of my current
implementation if you would like, in a patch format or otherwise
to your convenience.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gc