Skip to content

GC.GetTotalMemory occasionaly returns negative values #106712

@AndreyAkinshin

Description

@AndreyAkinshin

Description

image

Reproduction Steps

No stable repro, but it happens from time to time in one of my applications.

Expected behavior

GC.GetTotalMemory should always return only non-negative values

Actual behavior

GC.GetTotalMemory occasionally returns negative values

Regression?

No response

Known Workarounds

No response

Configuration

Windows 11 x64, .NET SDK 8.0.204, net8.0

Other information

If anyone can advise on how to diagnose/debug this issue, I can collect additional information when it happens next time.

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions