summaryrefslogtreecommitdiff
path: root/src/vm/class.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2018-06-09 13:39:58 -0700
committerGitHub <noreply@github.com>2018-06-09 13:39:58 -0700
commit911d332c523848023e3c6564788b72b7f419fca1 (patch)
treeae979e6b048630ed0393983d14bde5d43942459f /src/vm/class.cpp
parent618f9c2d18e88566ac61f93529bac58123c50cba (diff)
downloadcoreclr-911d332c523848023e3c6564788b72b7f419fca1.tar.gz
coreclr-911d332c523848023e3c6564788b72b7f419fca1.tar.bz2
coreclr-911d332c523848023e3c6564788b72b7f419fca1.zip
Avoid NativeOverlapped pinning by allocating unmanaged memory for it (#18360)
It makes PinnableBufferCache unnecessary
Diffstat (limited to 'src/vm/class.cpp')
-rw-r--r--src/vm/class.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/vm/class.cpp b/src/vm/class.cpp
index f66a719bb0..4375a340cd 100644
--- a/src/vm/class.cpp
+++ b/src/vm/class.cpp
@@ -2943,21 +2943,7 @@ void EEClass::Save(DataImage *image, MethodTable *pMT)
LOG((LF_ZAP, LL_INFO10000, "EEClass::Save %s (%p)\n", m_szDebugClassName, this));
- // Optimize packable fields before saving into ngen image (the packable fields are located at the end of
- // the EEClass or sub-type instance and packing will transform them into a space-efficient format which
- // should reduce the result returned by the GetSize() call below). Packing will fail if the compression
- // algorithm would result in an increase in size. We track this in the m_fFieldsArePacked data member
- // which we use to determine whether to access the fields in their packed or unpacked format.
- // Special case: we don't attempt to pack fields for the System.Threading.OverlappedData class since a
- // host can change the size of this at runtime. This requires modifying one of the packable fields and we
- // don't support updates to such fields if they were successfully packed.
- if (g_pOverlappedDataClass == NULL)
- {
- g_pOverlappedDataClass = MscorlibBinder::GetClass(CLASS__OVERLAPPEDDATA);
- _ASSERTE(g_pOverlappedDataClass);
- }
- if (this != g_pOverlappedDataClass->GetClass())
- m_fFieldsArePacked = GetPackedFields()->PackFields();
+ m_fFieldsArePacked = GetPackedFields()->PackFields();
DWORD cbSize = GetSize();