X-Git-Url: https://git.llucax.com/software/dgc/cdgc.git/blobdiff_plain/0cc16f584aa0cf5f588e01dc4234809022f9bd22..60c2ff134a50c1196ebfbce3c823fcac619fd043:/rt/gc/cdgc/iface.d diff --git a/rt/gc/cdgc/iface.d b/rt/gc/cdgc/iface.d index 3002284..721a4f3 100644 --- a/rt/gc/cdgc/iface.d +++ b/rt/gc/cdgc/iface.d @@ -31,14 +31,8 @@ import rt.gc.cdgc.stats: GCStats; import cstdlib = tango.stdc.stdlib; -version=GCCLASS; -version (GCCLASS) - alias GC gc_t; -else - alias GC* gc_t; - -gc_t _gc; +private GC* _gc; private int _termCleanupLevel=1; @@ -64,17 +58,7 @@ extern (C) void thread_init(); extern (C) void gc_init() { - version (GCCLASS) - { - ClassInfo ci = GC.classinfo; - void* p = cstdlib.malloc(ci.init.length); - (cast(byte*)p)[0 .. ci.init.length] = ci.init[]; - _gc = cast(GC)p; - } - else - { - _gc = cast(GC*) cstdlib.calloc(1, GC.sizeof); - } + _gc = cast(GC*) cstdlib.calloc(1, GC.sizeof); _gc.initialize(); version (DigitalMars) version(OSX) { _d_osx_image_init();