Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to set GCName via runtimeconfig. #74831

Merged
merged 3 commits into from
Sep 6, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/coreclr/vm/gcheaputilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

#include "common.h"
#include "configuration.h"
#include "gcheaputilities.h"
#include "gcenv.ee.h"
#include "appdomain.hpp"
Expand Down Expand Up @@ -179,7 +180,7 @@ HMODULE LoadStandaloneGc(LPCWSTR libFileName)
//
// See Documentation/design-docs/standalone-gc-loading.md for details
// on the loading protocol in use here.
HRESULT LoadAndInitializeGC(LPWSTR standaloneGcLocation)
HRESULT LoadAndInitializeGC(LPCWSTR standaloneGcLocation)
{
LIMITED_METHOD_CONTRACT;

Expand Down Expand Up @@ -334,8 +335,7 @@ HRESULT GCHeapUtilities::LoadAndInitialize()
assert(g_gc_load_status == GC_LOAD_STATUS_BEFORE_START);
g_gc_load_status = GC_LOAD_STATUS_START;

LPWSTR standaloneGcLocation = nullptr;
CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_GCName, &standaloneGcLocation);
LPCWSTR standaloneGcLocation = Configuration::GetKnobStringValue(W("System.GC.Name"), CLRConfig::EXTERNAL_GCName);
if (!standaloneGcLocation)
{
return InitializeDefaultGC();
Expand Down