registerGCFactory

Register a GC factory under the given name. This function must be called from a C constructor before druntime is initialized.

To use the registered GC, it's name must be specified gcopt runtime option, e.g. by passing , --DRT-gcopt=gc:my_gc_name as application argument.

void
registerGCFactory
nothrow @nogc

Parameters

name
Type: string

name of the GC implementation; should be unique

factory
Type: GCFactory

function to instantiate the implementation Note: The registry does not perform synchronization, as registration is assumed to be executed serially, as is the case for C constructors.

See Also

Suggestion Box / Bug Report