[MLton] implement _address and _symbol
skaller
skaller@users.sourceforge.net
Fri, 22 Jul 2005 06:38:37 +1000
--=-cinEDRDBhT1r7AtohNQS
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
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? =
The
> point is that in C it is unavoidable that at times you are going to hav=
e a
> pointer into the heap itself. This is ok because the C code knows (and =
must
> know) if it is doing something that might trigger a GC. As long as no GC=
is
> triggered, it can count on the fact that the pointer remains valid.
>=20
> The argument for Pinned comes when the C code wants to do something =
that
> might cause a GC (i.e., it wants to run some ML code). This is an aspect=
of
> the implementation of the C code. Hence it should be handled by somethin=
g in
> 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.
--=20
John Skaller <skaller at users dot sourceforge dot net>
--=-cinEDRDBhT1r7AtohNQS
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)
iD8DBQBC4AfLsRp8/9aGVGsRAkxOAKCUZ2QzklpIIYfKKnPj3QYAzlvPaQCeM/zy
DbxrV73nvYuI+qhLDTi5cGc=
=Ki0N
-----END PGP SIGNATURE-----
--=-cinEDRDBhT1r7AtohNQS--