Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
register precise GC
Browse files Browse the repository at this point in the history
  • Loading branch information
rainers committed Jan 20, 2019
1 parent 8bc3e77 commit a265773
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gc/impl/conservative/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -274,6 +280,11 @@ private GC initialize()
return instance;
}

private GC initialize_precise()
{
ConservativeGC.isPrecise = true;
return initialize();
}

debug(PRINTF)
void printGCBits(GCBits* bits)
Expand Down

0 comments on commit a265773

Please sign in to comment.