CLRがオブジェクトをラージオブジェクトヒープに配置する場合、それは「オールオアナッシング」取引ですか?クラス/構造体のメンバーは「分割」され、異なるヒープに配置されていますか?
class OneBigObject
{
byte[] bigObject;
public OneBigObject()
{
bigObject = new byte[100000];
}
}
class TwoSmallObjects
{
byte[] smallObject1;
byte[] smallObject2;
public TwoSmallObjects()
{
smallObject1 = new byte[50000];
smallObject2 = new byte[50000];
}
}
class MixedSizeObjects
{
byte[] smallObject1;
byte[] smallObject2;
byte[] bigObject;
public MixedSizeObjects()
{
smallObject1 = new byte[50000];
smallObject2 = new byte[50000];
bigObject = new byte[100000];
}
}
OneBigObject oneBigObject = new OneBigObject();
TwoSmallObjects twoObjects = new TwoSmallObjects();
MixedSizeObjects mixedSizeObjects = new MixedSizeObjects();
TwoSmallObjects
合計サイズが85,000バイトを超えるため、ラージオブジェクトヒープに配置されますか?両方のメンバーが個別にしきい値を下回っていても?どうMixedSizeObjects
ですか?