One awesome GC feature we will use in Mir!
Vladimir Panteleev
thecybershadow.lists at gmail.com
Tue Sep 18 16:19:23 UTC 2018
On Tuesday, 18 September 2018 at 14:23:44 UTC, 9il wrote:
> I just remember that D's GC has NO_SCAN [1] attribute!
>
> This will be added by default when for Mir allocations if type
> representation tuple has not references. For example, are
> Slice!(double*, 2) should never be scanned by GC, but it will
> be in GC heap until something refers it.
Not sure if this is what you mean or not, but the D GC already
doesn't scan types which do not contain references. This was
added in D 1.000, see TypeInfo.flags&1. NO_SCAN is a way to
further override that.
If you mean that Slice itself (when on the heap) should not be
scanned by the GC, I'm not sure that's a good idea. Is it not
conceivable that a Slice would be the only reference left
pointing at a block of memory in the heap?
More information about the Digitalmars-d
mailing list