Skip to content

Commit 15389e0

Browse files
committed
[MERGE #5352 @VSadov] Adding another kind of OOM errors for more cpecific bucketing of failures.
Merge pull request #5352 from VSadov:newOOM
2 parents ecaae5b + a6c871e commit 15389e0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/Common/Exceptions/ReportError.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,12 @@ _NOINLINE void OutOfMemoryTooManyClosedContexts_unrecoverable_error()
173173
ReportFatalException(NULL, E_OUTOFMEMORY, Fatal_OutOfMemory, scenario);
174174
}
175175

176+
// same as OutOfMemory_unrecoverable_error, but with a different `scenario`
177+
// - just to cause separate bucketing of these failures
178+
_NOINLINE void OutOfMemoryAllocationPolicy_unrecoverable_error()
179+
{
180+
int scenario = 14;
181+
ReportFatalException(NULL, E_OUTOFMEMORY, Fatal_OutOfMemory, scenario);
182+
}
183+
176184
#pragma optimize("",on)

lib/Common/Exceptions/ReportError.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ void RecyclerSingleAllocationLimit_unrecoverable_error();
7878
void MemGCSingleAllocationLimit_unrecoverable_error();
7979
void OutOfMemoryTooManyPinnedObjects_unrecoverable_error();
8080
void OutOfMemoryTooManyClosedContexts_unrecoverable_error();
81+
void OutOfMemoryAllocationPolicy_unrecoverable_error();
8182

8283
#ifndef DISABLE_SEH
8384
// RtlReportException is available on Vista and up, but we cannot use it for OOB release.

0 commit comments

Comments
 (0)