marlowsd at gmail.com
Mon Nov 24 10:17:40 UTC 2014
On 18/11/2014 18:03, Mathieu Boespflug wrote:
> On 18 November 2014 16:59, Simon Peyton Jones <simonpj at microsoft.com> wrote:
>> Isn't it this simple: the Static Pointer Table must be a source of roots for the garbage collector. Of course! An item in the SPT may be looked up at any time.
> As Facundo says, the existence of the SPT would solve everything. But
> we haven't quite figured out how to create a simple SPT yet, so were
> wondering whether there is an existing generic mechanism to register
> new GC roots.
Yes - the generic mechanism is StablePtrs, so you're on the right lines.
Even when you have an SPT you'll probably need to make a StablePtr to
it (though I haven't been following the discussion so just ignore me if
I'm wrong here).
> I guess there is no better solution but to just create an SPT, even if
> we don't yet have TypeRep's to put in it.
> With an SPT, and under the assumption of everyone sharing the same
> binary in the distributed system, there will be no need to hold on to
> *all* CAF's - just the ones that are known to have a StaticPointer
> created for them at compile time.
> ghc-devs mailing list
> ghc-devs at haskell.org
More information about the ghc-devs