diff --git a/src/coreclr/vm/comutilnative.h b/src/coreclr/vm/comutilnative.h index f59bbe7f66c11..11f805e4b66fc 100644 --- a/src/coreclr/vm/comutilnative.h +++ b/src/coreclr/vm/comutilnative.h @@ -83,13 +83,7 @@ struct GCGenerationInfo UINT64 fragmentationAfter; }; -#if defined(TARGET_X86) && !defined(TARGET_UNIX) #include "pshpack4.h" -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4121) // alignment of a member was sensitive to packing -#endif -#endif class GCMemoryInfoData : public Object { public: @@ -107,6 +101,7 @@ class GCMemoryInfoData : public Object UINT32 pauseTimePercent; UINT8 isCompaction; UINT8 isConcurrent; + UINT8 padding[6]; GCGenerationInfo generationInfo0; GCGenerationInfo generationInfo1; GCGenerationInfo generationInfo2; @@ -115,12 +110,7 @@ class GCMemoryInfoData : public Object UINT64 pauseDuration0; UINT64 pauseDuration1; }; -#if defined(TARGET_X86) && !defined(TARGET_UNIX) -#ifdef _MSC_VER -#pragma warning(pop) -#endif #include "poppack.h" -#endif #ifdef USE_CHECKED_OBJECTREFS typedef REF GCMEMORYINFODATA; diff --git a/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs b/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs index 9754b21ef79f3..4a75f254eaab8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs @@ -68,8 +68,8 @@ internal sealed class GCMemoryInfoData internal long _index; internal int _generation; internal int _pauseTimePercentage; - internal bool _compacted; - internal bool _concurrent; + internal byte _compacted; + internal byte _concurrent; private GCGenerationInfo _generationInfo0; private GCGenerationInfo _generationInfo1; @@ -158,12 +158,12 @@ internal GCMemoryInfo(GCMemoryInfoData data) /// /// Is this a compacting GC or not. /// - public bool Compacted => _data._compacted; + public bool Compacted => _data._compacted != 0; /// /// Is this a concurrent GC (BGC) or not. /// - public bool Concurrent => _data._concurrent; + public bool Concurrent => _data._concurrent != 0; /// /// Total committed bytes of the managed heap.