From a2657734a22886982ef79b421cb113da8ecf2190 Mon Sep 17 00:00:00 2001 From: Rainer Schuetze Date: Sun, 20 Jan 2019 09:11:17 +0100 Subject: [PATCH] register precise GC --- src/gc/impl/conservative/gc.d | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)