Skip to content

Commit ccf355c

Browse files
committed
Add code to use Unity GC.
1 parent 439b35f commit ccf355c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/coreclr/vm/mono/mono_coreclr.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ void SetupDomainPaths(MonoObject *alcObject)
441441

442442
extern "C" EXPORT_API MonoDomain* mono_jit_init_version(const char *file, const char* runtime_version)
443443
{
444+
#if defined(UNITYGC)
445+
_putenv_s("ComPlus_GCName", "unitygc.dll");
446+
SetEnvironmentVariableW(L"ComPlus_GCName", L"unitygc.dll");
447+
#endif
444448
g_gc_handles_lock.Init(CrstMonoHandles);
445449
g_add_internal_lock.Init(CrstMonoICalls);
446450

0 commit comments

Comments
 (0)