Set DOTNET_GCHeapHardLimit on riscv64 (#596) accepted/tizen/unified/20250117.152503 accepted/tizen/unified/x/20250117.125250
author이형주/MDE Lab(SR)/삼성전자 <leee.lee@samsung.com>
Thu, 16 Jan 2025 07:59:56 +0000 (16:59 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 16 Jan 2025 07:59:56 +0000 (16:59 +0900)
* 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)/삼성전자 <j-h.choi@samsung.com>
---------

Co-authored-by: 최종헌/MDE Lab(SR)/삼성전자 <j-h.choi@samsung.com>
NativeLauncher/launcher/lib/core_runtime.cc

index 3c2cb5045066521299dc322811de3f245db1243d..b7c2801128e7490d17493ef52d6dd0902c644757 100644 (file)
@@ -344,7 +344,10 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
        // UNW_ARM_METHOD_EXIDX         0x04
        putenv(const_cast<char *>("UNW_ARM_UNWIND_METHOD=6"));
 #endif // __arm__
-
+#ifdef __riscv
+       // Set heap hard limit to 16G on riscv
+       putenv(const_cast<char *>("DOTNET_GCHeapHardLimit=400000000"));
+#endif // __riscv
        // Enable diagnostics.
        // clr create clr-debug-pipe-xxx and dotnet-diagnostics-xxx file under /tmp dir.
        putenv(const_cast<char *>("COMPlus_EnableDiagnostics=1"));