need article: How is working D-GC?
KnightMare
black80 at bk.ru
Tue Jun 11 18:20:59 UTC 2019
please write some explanation about subj.
- what exactly it scans?
- why it scan data-segment?
https://issues.dlang.org/show_bug.cgi?id=15723
https://issues.dlang.org/show_bug.cgi?id=19947
precise GC doesn't help with issues.
- maybe add new type like gcpointer or something (making word
"pointer" as keyword is not good idea) that must be scanned 100%.
some mix of uint/ulong and void* with arithmetic support +=N -=N
for bytes offset without any cast. not for @safe.
- maybe to make precise gc as option for compiler (not runtime)
that will scans only pointer vars, gcpointer and other roots, not
the all data segment (no longs, no doubles[5], no long/double
fields in structs etc)?
at runtime GC has no info about data-segment so its pessimistic
and scans all of it (probably. need clarifying article).
if make it compile option than compiler/linker can say exactly
what should be scanned and what shouldn't.
- when I transfer some gcptr to C or another library its only my
responsibility to invoke GC.addRoot/addRange or some
.holdThisData in case addRoot/addRange has another mean.
the point is "dont scan everything, scan what user/compiler point
to u".
GC is dangerous for now, it should be fixed, nobody will work
with such GC at critical/24/7 systems. imo pessimistic gc should
be removed at all.
in case GC won't be fixed tell us, it will be fair.
More information about the Digitalmars-d-learn
mailing list