What's the go with the GC these days?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Jan 7 19:52:18 UTC 2019


On Mon, Jan 07, 2019 at 02:33:56PM -0500, Steven Schveighoffer via Digitalmars-d wrote:
> On 1/7/19 1:59 PM, Neia Neutuladh wrote:
[...]
> > Like I said before, casting to shared would have to invoke a runtime
> > function. That's a runtime change and compiler change, but I don't
> > think the spec says anything about whether any cast might invoke a
> > runtime function.
> > 
> 
> This is doable. Casting to/from shared should be a rare thing, and
> probably fine to hook.
> 
> However, the problem is more (for me) that the memory would have to be
> copied, as the memory is currently in one pool and has to be moved to
> another pool.
[...]

I think what Neia has in mind, which he mentioned in another post, is to
have the druntime function simply pin the object, whichever pool it
belongs to.  The idea being to tell the respective thread-local GC "this
object might be referenced by another thread, do not collect or move".


T

-- 
"The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."


More information about the Digitalmars-d mailing list