GC scan for pointers
Gerald Jansen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Mar 9 07:14:02 PST 2016
I've studied [1] and [2] but don't understand everything there.
Hence these dumb questions:
Given
enum n = 100_000_000; // some big number
auto a = new ulong[](n);
auto b = new char[8][](n);
struct S { ulong x; char[8] y; }
auto c = new S[](n);
will the large memory blocks allocated for a, b and/or c actually
be scanned for pointers to GC-allocated memory during a garbage
collection? If so, why?
[1]
http://p0nce.github.io/d-idioms/#How-the-D-Garbage-Collector-works
[2] http://dlang.org/garbage.html
More information about the Digitalmars-d-learn
mailing list