Skip to content

[Regions] Avoid declaring an object cannot fit in a segment if we already have committed space for it #55684

Description

@cshung

In #55585, I fixed the segment case. We need the same fix for regions.

The problem is that our code easily run into OutOfMemory in small containers.

Repro:

  1. Build a Windows X64 Release CoreRoot out of this commit 85cadd9650b3a2311278d2734d22007c8f297405
  2. Run GCPerfSim using the CoreRoot using these parameters
GCPerfSim.dll -tc 6 -tagb 100.0 -tlgb 0.07 -lohar 0 -pohar 0 -sohsi 10 -lohsi 0 -pohsi 0 -sohsr 100-4000 -lohsr 102400-204800 -pohsr 100-4000 -sohpi 10 -lohpi 0 -sohfi 0 -lohfi 0 -pohfi 0 -allocType reference -testKind time

under these configuration:

COMPlus_GCHeapCount=6
COMPlus_GCHeapHardLimit=1C200000
COMPlus_GCServer=1

This repro is not particularly easy to work with. With high probability, the process fails with #74401 instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions