From a8192fbc7064ed96cfeb8872bcb6479c217f7b5f Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 29 Oct 2015 19:09:52 -0700 Subject: Port .NET Framework 4.6.1 changes Core runtime and GC changes from https://github.com/Microsoft/dotnet/blob/master/docs/releases/net461/dotnet461-changes.md that are not in CoreCLR yet [tfs-changeset: 1543382] --- src/vm/pefile.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/vm/pefile.cpp') diff --git a/src/vm/pefile.cpp b/src/vm/pefile.cpp index 517092549c..f07cd051c9 100644 --- a/src/vm/pefile.cpp +++ b/src/vm/pefile.cpp @@ -1681,6 +1681,17 @@ void PEFile::SetNativeImage(PEImage *image) m_nativeImage->Load(); m_nativeImage->AllocateLazyCOWPages(); +#if defined(_TARGET_AMD64_) && !defined(CROSSGEN_COMPILE) + static ConfigDWORD configNGenReserveForJumpStubs; + int percentReserveForJumpStubs = configNGenReserveForJumpStubs.val(CLRConfig::INTERNAL_NGenReserveForJumpStubs); + if (percentReserveForJumpStubs != 0) + { + PEImageLayout * pLayout = image->GetLoadedLayout(); + ExecutionManager::GetEEJitManager()->EnsureJumpStubReserve((BYTE *)pLayout->GetBase(), pLayout->GetVirtualSize(), + percentReserveForJumpStubs * (pLayout->GetVirtualSize() / 100)); + } +#endif + ExternalLog(LL_INFO100, W("Attempting to use native image %s."), image->GetPath().GetUnicode()); RETURN; } -- cgit v1.2.3