Return HardLimitBytes from GCMemoryInfo.TotalAvailableMemoryBytes (#25437)
authorAndy Hanson <anhans@microsoft.com>
Mon, 8 Jul 2019 23:12:06 +0000 (16:12 -0700)
committerJan Kotas <jkotas@microsoft.com>
Mon, 8 Jul 2019 23:12:06 +0000 (16:12 -0700)
commit11137fbe46f524dfd6c2f7bb2a77035aa225524c
tree116160fa9d0ed8c8cb2fa1cb6ac407e476ab96cf
parent8749c016e520bcaa23c56a862fe5f57eba1b879b
Return HardLimitBytes from GCMemoryInfo.TotalAvailableMemoryBytes (#25437)

* Add property HardLimitBytes to GCMemoryInfo

This adds a new property HardLimitBytes.

Unlike TotalAvailableMemoryBytes,
this will reflect an explicitly set COMPLUS_GCHeapHardLimit.

It will also reflect the fraction of a container's size that we use,
where TotalAvailableMemoryBytes is the total container size.

Normally, though, it is equal to TotalAvailableMemoryBytes.

Fix #38821

* Remove HardLimitBytes; have TotalAvailableMemoryBytes take on its behavior

* Fix typos

* Separate total_physical_mem and heap_hard_limit
so we can compute highMemoryLoadThresholdBytes and memoryLoadBytes

* Do more work in gc.cpp instead of Gc.cs

* Consistently end names in "Bytes"
src/System.Private.CoreLib/shared/System/GCMemoryInfo.cs
src/System.Private.CoreLib/src/System/GC.cs
src/gc/gc.cpp
src/gc/gcimpl.h
src/gc/gcinterface.h
src/vm/comutilnative.cpp
src/vm/comutilnative.h