[MLton] implement _address and _symbol
Fri, 22 Jul 2005 06:38:37 +1000
On Thu, 2005-07-21 at 14:57 -0500, Henry Cejtin wrote:
> Isn't all of this stuff with Pinned things really in the wrong place? =
> point is that in C it is unavoidable that at times you are going to hav=
> pointer into the heap itself. This is ok because the C code knows (and =
> know) if it is doing something that might trigger a GC. As long as no GC=
> triggered, it can count on the fact that the pointer remains valid.
> The argument for Pinned comes when the C code wants to do something =
> might cause a GC (i.e., it wants to run some ML code). This is an aspect=
> the implementation of the C code. Hence it should be handled by somethin=
> the C code, not by changing the interface to the C code.
This cannot be done when the C code calls into ML which calls
back into C: callbacks in a GUI for example. In that case
the inner C code wants the same unmoved pointer, but ML
has got in between and might do a collection.
John Skaller <skaller at users dot sourceforge dot net>
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
-----END PGP SIGNATURE-----