diff --git a/src/gc/impl/conservative/gc.d b/src/gc/impl/conservative/gc.d index cbd840fd54..1a0fbc8337 100644 --- a/src/gc/impl/conservative/gc.d +++ b/src/gc/impl/conservative/gc.d @@ -257,6 +257,12 @@ extern(C) pragma(crt_constructor) void _d_register_conservative_gc() registerGCFactory("conservative", &initialize); } +extern(C) pragma(crt_constructor) void _d_register_precise_gc() +{ + import gc.registry; + registerGCFactory("precise", &initialize_precise); +} + private GC initialize() { import core.stdc.string: memcpy; @@ -274,6 +280,11 @@ private GC initialize() return instance; } +private GC initialize_precise() +{ + ConservativeGC.isPrecise = true; + return initialize(); +} debug(PRINTF) void printGCBits(GCBits* bits)