From cadb99c765fe3c88e86bb67bc6340f632fece72a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=98=95=EC=A3=BC/MDE=20Lab=28SR=29/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 16 Jan 2025 16:59:56 +0900 Subject: [PATCH] Set DOTNET_GCHeapHardLimit on riscv64 (#596) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Set DOTNET_GCHeapHardLimit on riscv64 Fixes: https://github.sec.samsung.net/dotnet/runtime/issues/655 * Update NativeLauncher/launcher/lib/core_runtime.cc Co-authored-by: 최종헌/MDE Lab(SR)/삼성전자 --------- Co-authored-by: 최종헌/MDE Lab(SR)/삼성전자 --- NativeLauncher/launcher/lib/core_runtime.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NativeLauncher/launcher/lib/core_runtime.cc b/NativeLauncher/launcher/lib/core_runtime.cc index 3c2cb50..b7c2801 100644 --- a/NativeLauncher/launcher/lib/core_runtime.cc +++ b/NativeLauncher/launcher/lib/core_runtime.cc @@ -344,7 +344,10 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode) // UNW_ARM_METHOD_EXIDX 0x04 putenv(const_cast("UNW_ARM_UNWIND_METHOD=6")); #endif // __arm__ - +#ifdef __riscv + // Set heap hard limit to 16G on riscv + putenv(const_cast("DOTNET_GCHeapHardLimit=400000000")); +#endif // __riscv // Enable diagnostics. // clr create clr-debug-pipe-xxx and dotnet-diagnostics-xxx file under /tmp dir. putenv(const_cast("COMPlus_EnableDiagnostics=1")); -- 2.34.1