--=-k+5ix7woOvrDIT6lyy2m
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello, I'm currently in the process of embedding a Ruby interpreter in a
C++ application which uses its own conservative garbage collector,
relying upon the ability to inspect the C stack.

Unfortunately, the stacks of Ruby threads other than the current one (as
well as stack snapshots saved as part of continuations) are not visible
to the collector, resulting in premature collections.

One solution would be to patch the allocation function(s) used for
allocating the stack snapshots, to notify the non-Ruby collector to
treat those memory ranges as roots.  However, it is not clear how to do
this without modifying the Ruby interpreter.

Another solution would be to patch ruby_xmalloc() etc. to use the
application GC's allocator, although that could cause problems with
excessive false pointers since all Ruby memory (including strings) would
be scanned.

Are there any other suggestions, or any solutions which don't involve a
patched Ruby interpreter?  I would like to be able to use the user's
installed Ruby interpreter if possible.

-mental

--=-k+5ix7woOvrDIT6lyy2m
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBE9hx6SuZBmZzm14ERAoEvAKDFwwez9Guh1Y3jAn3fzediBUWOCgCeIyil
NEFczgl0Mkd+uhpn/3j9Fns=
=D9tt
-----END PGP SIGNATURE-----

--=-k+5ix7woOvrDIT6lyy2m--