1 type derived from OutOfMemoryException
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\InsufficientMemoryException.cs (1)
19public sealed class InsufficientMemoryException : OutOfMemoryException
130 instantiations of OutOfMemoryException
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (2)
461return new OutOfMemoryException(SRServiceModel.TcpConnectNoBufs, innerException); 467return new OutOfMemoryException(SRServiceModel.InsufficentMemory, socketException);
ILCompiler.Compiler (1)
Compiler\Disassembler.cs (1)
96throw new OutOfMemoryException();
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
398throw new OutOfMemoryException();
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (1)
398throw new OutOfMemoryException();
Microsoft.Diagnostics.DataContractReader (1)
ContractDescriptorTarget.cs (1)
567throw new OutOfMemoryException($"Failed to allocate {size} bytes in the target process (AllocVirtual returned S_OK but no address).");
Microsoft.Extensions.Logging.Console (1)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
Microsoft.ML.Tokenizers (1)
Tokenizer.cs (1)
403throw new OutOfMemoryException();
Microsoft.Private.Windows.Core (1)
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (1)
39return new OutOfMemoryException(SR.GdiplusInsufficientBuffer);
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
236Return New OutOfMemoryException(Description)
PresentationCore (9)
MS\Internal\Generic\Span.cs (2)
232throw new OutOfMemoryException(); 245throw new OutOfMemoryException();
MS\Internal\Span.cs (2)
315throw new OutOfMemoryException(); 326throw new OutOfMemoryException();
src\wpf\src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (2)
783return new OutOfMemoryException(); 794return new System.OutOfMemoryException();
System\Windows\Media\MediaContext.cs (2)
424throw new System.OutOfMemoryException(); 426throw new System.OutOfMemoryException(SR.MediaContext_OutOfVideoMemory);
System\Windows\Media\textformatting\TextFormatterContext.cs (1)
391throw new OutOfMemoryException (message);
PresentationFramework (2)
MS\Internal\PtsHost\Pts.cs (2)
53throw new OutOfMemoryException(); 88throw new OutOfMemoryException();
System.Collections.Immutable (1)
System\Collections\Frozen\FrozenHashTable.cs (1)
62throw new OutOfMemoryException();
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbBuffer.cs (1)
30throw new OutOfMemoryException();
System.Data.OleDb (4)
DbPropSet.cs (2)
41throw new OutOfMemoryException(); 259throw new OutOfMemoryException();
RowBinding.cs (1)
273throw new OutOfMemoryException();
System\Data\ProviderBase\DbBuffer.cs (1)
31throw new OutOfMemoryException();
System.DirectoryServices (4)
System\DirectoryServices\ActiveDirectory\DirectoryContext.cs (2)
594throw new OutOfMemoryException(); 624throw new OutOfMemoryException();
System\DirectoryServices\ActiveDirectory\Exception.cs (2)
348exception = new OutOfMemoryException(); 392return new OutOfMemoryException();
System.DirectoryServices.AccountManagement (2)
System\DirectoryServices\AccountManagement\exceptions.cs (2)
310exception = new OutOfMemoryException(); 342return new OutOfMemoryException();
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\Interop\SafeHandles.Linux.cs (1)
59throw new OutOfMemoryException();
System.Drawing.Common (1)
System\Drawing\BufferedGraphicsContext.cs (1)
211throw new OutOfMemoryException(SR.GraphicsBufferQueryFail);
System.IO.Compression (6)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System\IO\Compression\Zstandard\ZstandardDecoder.cs (2)
149throw new OutOfMemoryException(); 332throw new OutOfMemoryException();
System\IO\Compression\Zstandard\ZstandardEncoder.cs (2)
189throw new OutOfMemoryException(); 354throw new OutOfMemoryException();
System\IO\Compression\Zstandard\ZstandardUtils.cs (1)
76return new OutOfMemoryException();
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
346throw new OutOfMemoryException();
System.Memory (1)
src\runtime\src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
250throw new OutOfMemoryException(SR.Format(SR.BufferMaximumSizeExceeded, capacity));
System.Net.Http (1)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.NameResolution (1)
System\Net\NameResolutionPal.Unix.cs (1)
46throw new OutOfMemoryException();
System.Net.Quic (2)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
78return new OutOfMemoryException();
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.Security (2)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
78return new OutOfMemoryException();
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.ServerSentEvents (1)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
940throw new OutOfMemoryException();
System.Private.CoreLib (46)
Internal\Runtime\FrozenObjectHeapManager.cs (4)
133throw new OutOfMemoryException(); 142throw new OutOfMemoryException(); 151throw new OutOfMemoryException(); 185throw new OutOfMemoryException();
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Concurrent\ConcurrentUnifier.cs (1)
211throw new OutOfMemoryException();
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Concurrent\ConcurrentUnifierW.cs (1)
289throw new OutOfMemoryException();
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Concurrent\ConcurrentUnifierWKeyed.cs (1)
271throw new OutOfMemoryException();
src\runtime\src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\RuntimeExports.cs (1)
95throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2502throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
84throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
972throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (4)
98throw new OutOfMemoryException(); 157throw new OutOfMemoryException(); 194throw new OutOfMemoryException(); 216throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
831return new System.OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (4)
102throw new OutOfMemoryException(); 109throw new OutOfMemoryException(); 128throw new OutOfMemoryException(); 135throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (3)
980throw new OutOfMemoryException(); 2450throw new OutOfMemoryException(); 2651throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (1)
17throw new OutOfMemoryException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedMutex.Unix.cs (1)
330Interop.Error.EAGAIN => throw new OutOfMemoryException(),
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (3)
488throw new OutOfMemoryException(); 500throw new OutOfMemoryException(SR.OutOfMemory_StringTooLong); 506throw new OutOfMemoryException(SR.Lock_Enter_WaiterCountOverflow_OutOfMemoryException);
System\Array.NativeAot.cs (2)
154throw new OutOfMemoryException(); // "Array dimensions exceeded supported range." 159throw new OutOfMemoryException(); // "Array dimensions exceeded supported range."
System\GC.NativeAot.cs (2)
844throw new OutOfMemoryException(); 871throw new OutOfMemoryException();
System\Runtime\InteropServices\ComWrappers.NativeAot.cs (1)
28throw new OutOfMemoryException();
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
117throw new OutOfMemoryException();
System\Runtime\InteropServices\TrackerObjectManager.NativeAot.cs (1)
118throw new OutOfMemoryException();
System\Runtime\RuntimeImports.cs (4)
68throw new OutOfMemoryException(); 260throw new OutOfMemoryException(); 279throw new OutOfMemoryException(); 291throw new OutOfMemoryException();
System\Runtime\ThunkPool.cs (1)
320throw new OutOfMemoryException();
System\RuntimeExceptionHelpers.cs (2)
23Instance = new OutOfMemoryException(message: null); // Cannot call the nullary constructor as that triggers non-trivial resource manager logic. 67outOfMemoryException = new OutOfMemoryException();
System\Threading\SyncTable.cs (1)
217throw new OutOfMemoryException();
System\Threading\Thread.NativeAot.cs (2)
372throw new OutOfMemoryException(); 400throw new ThreadStartException(startException ?? new OutOfMemoryException());
System\Type.NativeAot.cs (1)
54throw new OutOfMemoryException();
System.Private.Windows.Core (1)
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (1)
39return new OutOfMemoryException(SR.GdiplusInsufficientBuffer);
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Modules\GetTypeCoreCache.cs (1)
129throw new OutOfMemoryException();
System.Security.AccessControl (8)
System\Security\AccessControl\Privilege.cs (4)
98throw new OutOfMemoryException(); 253throw new OutOfMemoryException(); 446throw new OutOfMemoryException(); 512throw new OutOfMemoryException();
System\Security\AccessControl\SecurityDescriptor.cs (1)
474throw new OutOfMemoryException();
System\Security\AccessControl\Win32.cs (3)
50throw new OutOfMemoryException(); 182throw new OutOfMemoryException(); 309throw new OutOfMemoryException();
System.Security.Cryptography.Pkcs (1)
Microsoft\Win32\SafeHandles\SafeHeapAllocHandle.cs (1)
21throw new OutOfMemoryException();
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
376throw new OutOfMemoryException();
System.Security.Principal.Windows (7)
System\Security\Principal\NTAccount.cs (1)
270throw new OutOfMemoryException();
System\Security\Principal\SID.cs (4)
504throw new OutOfMemoryException(); 583throw new OutOfMemoryException(); 774throw new OutOfMemoryException(); 997throw new OutOfMemoryException();
System\Security\Principal\Win32.cs (1)
41throw new OutOfMemoryException();
System\Security\Principal\WindowsIdentity.cs (1)
846return new OutOfMemoryException();
System.Text.Json (2)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System\Text\Json\ThrowHelper.cs (1)
604throw new OutOfMemoryException(SR.Format(SR.BufferMaximumSizeExceeded, capacity));
System.Windows.Forms (9)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
2230return insertIndex < 0 ? throw new OutOfMemoryException(SR.ComboBoxItemOverflow) : insertIndex; 2283throw new OutOfMemoryException(SR.ComboBoxItemOverflow);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
1537throw new OutOfMemoryException(); 1546throw new OutOfMemoryException(SR.ListBoxItemOverflow); 1593throw new OutOfMemoryException(); 1602throw new OutOfMemoryException(SR.ListBoxItemOverflow);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
2026throw new OutOfMemoryException(); 3286throw new OutOfMemoryException(SR.OutOfMemory);
System\Windows\Forms\NativeWindow.cs (1)
457throw new OutOfMemoryException(SR.ErrorCreatingHandle, e);
UIAutomationClient (1)
MS\Internal\Automation\Misc.cs (1)
247throw new OutOfMemoryException();
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (1)
373throw new OutOfMemoryException();
MS\Internal\AutomationProxies\Misc.cs (1)
1691throw new OutOfMemoryException();
207 references to OutOfMemoryException
dotnet-Microsoft.XmlSerializer.Generator (3)
Sgen.cs (3)
211if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) 455if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException) 654if (exp is ThreadAbortException || exp is StackOverflowException || exp is OutOfMemoryException)
dotnet-svcutil-lib (16)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
655if (e is OutOfMemoryException)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (3)
469if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException) 892if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException) 1303if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (2)
1055if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException) 1124if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (2)
392if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException) 484if (/*e is ThreadAbortException || e is StackOverflowException ||*/ e is OutOfMemoryException)
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (1)
269e is OutOfMemoryException ||
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (3)
186exception is OutOfMemoryException || 345catch (OutOfMemoryException exception) 361catch (OutOfMemoryException exception)
FrameworkFork\System.ServiceModel\SMDiagnostics\DiagnosticUtility.cs (1)
71catch (OutOfMemoryException)
FrameworkFork\System.Web.Services\Fx.cs (1)
11return e is OutOfMemoryException;
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (1)
3187if (e is OutOfMemoryException)
Shared\Utilities\Utilities.cs (1)
23ex is OutOfMemoryException ||
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (1)
78exception is OutOfMemoryException ||
Microsoft.Build.Framework (1)
ExceptionHandling.cs (1)
27if (e is OutOfMemoryException
Microsoft.Build.Tasks.Git (2)
GitDataReader\GitRefTableReader.cs (1)
424catch (OutOfMemoryException)
GitDataReader\GitRefTableReader.Primitives.cs (1)
121catch (OutOfMemoryException)
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
707var diagnostic = (e is OutOfMemoryException) 1476if (e is OutOfMemoryException)
Microsoft.CodeAnalysis.VisualBasic (1)
Semantics\Operators.vb (1)
1528Catch e As System.OutOfMemoryException
Microsoft.ML.AutoML (1)
AutoMLExperiment\AutoMLExperiment.cs (1)
318if (ex is not OperationCanceledException && ex is not OutOfMemoryException && _bestTrialResult == null)
Microsoft.ML.Parquet (1)
ParquetLoader.cs (1)
644catch (OutOfMemoryException)
Microsoft.Private.Windows.Core (1)
System\ExceptionExtensions.cs (1)
21or OutOfMemoryException
Microsoft.VisualBasic.Core (48)
Microsoft\VisualBasic\Collection.vb (2)
100Catch ex As OutOfMemoryException 233Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
1921Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
178Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\IOUtils.vb (1)
72Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (4)
157Catch exInner As OutOfMemoryException 443Catch exInner As OutOfMemoryException 594Catch ex As OutOfMemoryException 846Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (1)
91Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (5)
1010Catch ex As OutOfMemoryException 1030Catch ex As OutOfMemoryException 2089Catch ex As OutOfMemoryException 3278Catch ex As OutOfMemoryException 3294Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\StringType.vb (1)
740Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (3)
80Catch ex As OutOfMemoryException 112Catch ex As OutOfMemoryException 149Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\VB6InputFile.vb (2)
46Catch ex As OutOfMemoryException 116Catch ex As OutOfMemoryException
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (3)
50Catch ex As OutOfMemoryException 78Catch ex As OutOfMemoryException 87Catch ex As OutOfMemoryException
Microsoft\VisualBasic\Conversion.vb (2)
522Catch ex As OutOfMemoryException 919Catch ex As OutOfMemoryException
Microsoft\VisualBasic\DateAndTime.vb (10)
63Catch ex As OutOfMemoryException 113Catch ex As OutOfMemoryException 288Catch ex As OutOfMemoryException 309Catch ex As OutOfMemoryException 318Catch ex As OutOfMemoryException 337Catch ex As OutOfMemoryException 410Catch ex As OutOfMemoryException 420Catch ex As OutOfMemoryException 430Catch ex As OutOfMemoryException 557Catch ex As OutOfMemoryException
Microsoft\VisualBasic\FileSystem.vb (1)
228Catch ex As OutOfMemoryException
Microsoft\VisualBasic\Financial.vb (1)
255Catch ex As OutOfMemoryException
Microsoft\VisualBasic\Information.vb (1)
381Catch ex As OutOfMemoryException
Microsoft\VisualBasic\Interaction.vb (4)
399Catch ex As OutOfMemoryException 537Catch ex As OutOfMemoryException 554Catch ex As OutOfMemoryException 568Catch ex As OutOfMemoryException
Microsoft\VisualBasic\Strings.vb (5)
305Catch ex As OutOfMemoryException 488Catch ex As OutOfMemoryException 972Catch ex As OutOfMemoryException 1262Catch ex As OutOfMemoryException 1995Catch ex As OutOfMemoryException
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
383[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OutOfMemoryException))]
netstandard (1)
netstandard.cs (1)
1347[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OutOfMemoryException))]
PresentationBuildTasks (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CriticalExceptions.cs (1)
25ex is OutOfMemoryException ||
PresentationCore (1)
System\Windows\LayoutManager.cs (1)
1000catch(System.OutOfMemoryException)
PresentationFramework (5)
System\Windows\Documents\InputScopeAttribute.cs (3)
58catch (OutOfMemoryException) 86catch (OutOfMemoryException) 99catch (OutOfMemoryException)
System\windows\Documents\TextEditorCopyPaste.cs (1)
859catch (OutOfMemoryException)
System\Windows\Documents\WpfPayload.cs (1)
349catch (System.OutOfMemoryException)
System.Data.Common (2)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
231private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException);
System\Data\DataSetUtil.cs (1)
92(e.GetType() != typeof(OutOfMemoryException)) &&
System.Data.Odbc (1)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
231private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException);
System.Data.OleDb (2)
System\Data\Common\AdapterUtil.cs (1)
214private static readonly Type OutOfMemoryType = typeof(OutOfMemoryException);
System\Data\ProviderBase\DbConnectionPool.cs (1)
982catch (System.OutOfMemoryException)
System.Drawing.Common (3)
System\Drawing\ClientUtils.cs (1)
17or OutOfMemoryException
System\Drawing\Image.cs (1)
66or OutOfMemoryException
System\Drawing\SystemFonts.cs (1)
142or OutOfMemoryException
System.Formats.Nrbf (2)
System\Formats\Nrbf\ArrayRecord.cs (1)
69/// An attacker could have sent a small payload that requires allocation of a very large array, which could cause <see cref="OutOfMemoryException"/> and denial of service.
System\Formats\Nrbf\SZArrayRecord.cs (1)
40/// that could cause <see cref="OutOfMemoryException"/> and denial of service.
System.IO.Pipelines (4)
System\IO\Pipelines\PipeWriter.cs (4)
69/// This method never returns <see cref="System.Memory{T}.Empty" />, but it throws an <see cref="System.OutOfMemoryException" /> if the requested buffer size is not available. 71/// <exception cref="System.OutOfMemoryException">The requested buffer size is not available.</exception> 78/// This method never returns <see cref="System.Span{T}.Empty" />, but it throws an <see cref="System.OutOfMemoryException" /> if the requested buffer size is not available. 80/// <exception cref="System.OutOfMemoryException">The requested buffer size is not available.</exception>
System.Management (2)
System\Management\ManagementOptions.cs (1)
1673catch (OutOfMemoryException)
System\Management\ManagementScope.cs (1)
63e is OutOfMemoryException ||
System.Net.Http (1)
src\runtime\src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System.Net.HttpListener (2)
src\runtime\src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
121catch (OutOfMemoryException oom)
System.Net.Primitives (2)
System\Net\CookieContainer.cs (2)
302catch (OutOfMemoryException) 621catch (OutOfMemoryException)
System.Net.Requests (3)
src\runtime\src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System\Net\FtpWebRequest.cs (2)
1061if (e is OutOfMemoryException 1095if (exception is OutOfMemoryException)
System.Net.Security (1)
src\runtime\src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System.Net.Sockets (13)
src\runtime\src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System\Net\Sockets\NetworkStream.cs (12)
242catch (Exception exception) when (!(exception is OutOfMemoryException)) 267catch (Exception exception) when (!(exception is OutOfMemoryException)) 314catch (Exception exception) when (!(exception is OutOfMemoryException)) 340catch (Exception exception) when (!(exception is OutOfMemoryException)) 454catch (Exception exception) when (!(exception is OutOfMemoryException)) 479catch (Exception exception) when (!(exception is OutOfMemoryException)) 521catch (Exception exception) when (!(exception is OutOfMemoryException)) 542catch (Exception exception) when (!(exception is OutOfMemoryException)) 580catch (Exception exception) when (!(exception is OutOfMemoryException)) 603catch (Exception exception) when (!(exception is OutOfMemoryException)) 640catch (Exception exception) when (!(exception is OutOfMemoryException)) 662catch (Exception exception) when (!(exception is OutOfMemoryException))
System.Net.WebClient (25)
System\Net\WebClient.cs (25)
308catch (Exception e) when (!(e is OutOfMemoryException)) 338catch (Exception e) when (!(e is OutOfMemoryException)) 373catch (Exception e) when (!(e is OutOfMemoryException)) 411catch (Exception e) when (!(e is OutOfMemoryException)) 463catch (Exception e) when (!(e is OutOfMemoryException)) 579if (e is OutOfMemoryException) throw; 643catch (Exception e) when (!(e is OutOfMemoryException)) 708catch (Exception exception) when (!(exception is OutOfMemoryException)) { } 858catch (Exception e) when (!(e is OutOfMemoryException)) 928catch (Exception e) when (!(e is OutOfMemoryException)) 996catch (Exception e) when (!(e is OutOfMemoryException)) 1071catch (Exception e) when (!(e is OutOfMemoryException)) 1210catch (Exception e) when (!(e is OutOfMemoryException)) 1218catch (Exception e) when (!(e is OutOfMemoryException)) 1251catch (Exception e) when (!(e is OutOfMemoryException)) 1259catch (Exception e) when (!(e is OutOfMemoryException)) 1277catch (Exception e) when (!(e is OutOfMemoryException)) 1300catch (Exception e) when (!(e is OutOfMemoryException)) 1326catch (Exception e) when (!(e is OutOfMemoryException)) 1355catch (Exception e) when (!(e is OutOfMemoryException)) 1394catch (Exception e) when (!(e is OutOfMemoryException)) 1404catch (Exception e) when (!(e is OutOfMemoryException)) 1443catch (Exception e) when (!(e is OutOfMemoryException)) 1479catch (Exception e) when (!(e is OutOfMemoryException)) 1519catch (Exception e) when (!(e is OutOfMemoryException))
System.Private.CoreLib (23)
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (1)
194catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (1)
54catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (2)
226catch (OutOfMemoryException) when (!throwOnFail) 237catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
210catch (OutOfMemoryException) when (!throwOnFail) 221catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeMemory.cs (2)
16/// <exception cref="OutOfMemoryException">Allocating <paramref name="elementCount" /> * <paramref name="elementSize" /> bytes of memory failed.</exception> 31/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory failed.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeMemory.Unix.cs (5)
18/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory with <paramref name="alignment" /> failed.</exception> 78/// <exception cref="OutOfMemoryException">Reallocating <paramref name="byteCount" /> of memory with <paramref name="alignment" /> failed.</exception> 121/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory failed.</exception> 144/// <exception cref="OutOfMemoryException">Allocating <paramref name="elementCount" /> * <paramref name="elementSize" /> bytes of memory failed.</exception> 191/// <exception cref="OutOfMemoryException">Reallocating <paramref name="byteCount" /> of memory failed.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (1)
376catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (1)
293catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (4)
175/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 185/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 221/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 229/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
684catch (OutOfMemoryException)
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
130catch (Exception ex) when (ex is IOException || ex is OutOfMemoryException)
System\RuntimeExceptionHelpers.cs (2)
18public static OutOfMemoryException Instance { get; private set; } 299Internal.Console.Error.Write(exception.GetMethodTable() == Internal.Runtime.MethodTable.Of<OutOfMemoryException>() ? "Out of memory." : exception.GetType().FullName);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ExceptionUtility.cs (1)
16if ((exception is OutOfMemoryException && !(exception is InsufficientMemoryException)) ||
System.Private.Reflection.Execution (1)
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (1)
194catch (OutOfMemoryException)
System.Private.TypeLoader (1)
src\runtime\src\coreclr\nativeaot\Common\src\System\Collections\Generic\LowLevelDictionary.cs (1)
194catch (OutOfMemoryException)
System.Private.Windows.Core (1)
System\ExceptionExtensions.cs (1)
21or OutOfMemoryException
System.Private.Windows.Core.TestUtilities (1)
XUnit\ForceGCAttribute.cs (1)
11/// after each test. This helps prevent <see cref="OutOfMemoryException"/> in x86
System.Private.Xml (8)
System\Xml\Serialization\Compilation.cs (2)
164if (e is OutOfMemoryException) 257if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
626if (e is OutOfMemoryException)
System\Xml\Serialization\XmlReflectionImporter.cs (3)
478if (e is OutOfMemoryException) 900if (e is OutOfMemoryException) 1314if (e is OutOfMemoryException)
System\Xml\Serialization\XmlSerializationReader.cs (1)
1087if (e is OutOfMemoryException)
System\Xml\XmlException.cs (1)
296e is OutOfMemoryException ||
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
421[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OutOfMemoryException))]
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
18if ((exception is OutOfMemoryException && !(exception is InsufficientMemoryException)) ||
System.Security.Cryptography.ProtectedData (6)
System\Security\Cryptography\ProtectedData.cs (6)
49/// <exception cref="OutOfMemoryException">The system ran out of memory while encrypting the data.</exception> 97/// <exception cref="OutOfMemoryException">The system ran out of memory while encrypting the data.</exception> 137/// <exception cref="OutOfMemoryException">The system ran out of memory while encrypting the data.</exception> 201/// <exception cref="OutOfMemoryException">The system ran out of memory while decrypting the data.</exception> 250/// <exception cref="OutOfMemoryException">The system ran out of memory while encrypting the data.</exception> 290/// <exception cref="OutOfMemoryException">The system ran out of memory while encrypting the data.</exception>
System.ServiceModel.Federation (1)
System\Runtime\Fx.cs (1)
15if (exception is OutOfMemoryException && !(exception is InsufficientMemoryException))
System.ServiceModel.Primitives (3)
Internals\System\Runtime\Fx.cs (3)
188(exception is OutOfMemoryException && !(exception is InsufficientMemoryException)) || 363catch (OutOfMemoryException exception) 378catch (OutOfMemoryException exception)
System.Threading (3)
System\Threading\ReaderWriterLock.cs (3)
1016/// <exception cref="OutOfMemoryException">Failed to allocate the event object</exception> 1036/// <exception cref="OutOfMemoryException">Failed to allocate the event object</exception> 1122/// In this C# rewrite, out-of-memory and low-resource cases throw <see cref="OutOfMemoryException"/> or whatever the
System.Windows.Forms (2)
System\Windows\Forms\Control.cs (1)
12620catch (Exception ex) when (!ex.IsCriticalException() || ex is OutOfMemoryException)
System\Windows\Forms\Rendering\GdiCache.cs (1)
57catch (OutOfMemoryException)
System.Xaml (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CriticalExceptions.cs (1)
25ex is OutOfMemoryException ||
UIAutomationClient (2)
MS\Internal\Automation\Accessible.cs (1)
104return !(e is OutOfMemoryException)
MS\Internal\Automation\Misc.cs (1)
211return e is NullReferenceException || e is StackOverflowException || e is OutOfMemoryException || e is System.Threading.ThreadAbortException;
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\Accessible.cs (1)
1286if (e is OutOfMemoryException)
MS\Internal\AutomationProxies\Misc.cs (1)
803return e is NullReferenceException || e is StackOverflowException || e is OutOfMemoryException || e is System.Threading.ThreadAbortException;