1 type derived from OutOfMemoryException
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\InsufficientMemoryException.cs (1)
19public sealed class InsufficientMemoryException : OutOfMemoryException
78 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);
Microsoft.Build (1)
CommunicationsUtilities.cs (1)
314throw new OutOfMemoryException();
Microsoft.Build.Engine.UnitTests (3)
BackEnd\EventSourceSink_Tests.cs (3)
218throw new OutOfMemoryException(); 228Exception[] exceptionArray = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical 239Exception[] exceptionArray1 = new Exception[] { new OutOfMemoryException(), new IndexOutOfRangeException(), new Exception() }; //// two non-critical exceptions, one critical
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\ActiveStatementTests.cs (1)
12947throw outOfMemory ? new OutOfMemoryException() : new SimpleToStringException();
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
758throw outOfMemory ? new OutOfMemoryException() : new NullReferenceException("NullRef!");
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
Microsoft.ML.Tokenizers (1)
Tokenizer.cs (1)
403throw new OutOfMemoryException();
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
236Return New OutOfMemoryException(Description)
MSBuildTaskHost (1)
CommunicationsUtilities.cs (1)
314throw new OutOfMemoryException();
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\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.Concurrent (1)
System\ThrowHelper.cs (1)
23internal static void ThrowOutOfMemoryException() => throw new OutOfMemoryException();
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbBuffer.cs (1)
30throw new OutOfMemoryException();
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
236throw new OutOfMemoryException(SR.Format(SR.BufferSizeTooLarge, _internalBufferSize));
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
346throw new OutOfMemoryException();
System.Memory (1)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
250throw new OutOfMemoryException(SR.Format(SR.BufferMaximumSizeExceeded, capacity));
System.Net.Http (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.NameResolution (1)
System\Net\NameResolutionPal.Unix.cs (1)
45throw new OutOfMemoryException();
System.Net.Quic (2)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
77return new OutOfMemoryException();
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.Security (2)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
77return new OutOfMemoryException();
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.ServerSentEvents (1)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (1)
157throw new OutOfMemoryException();
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
938throw new OutOfMemoryException();
System.Private.CoreLib (22)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
327ExceptionIDs.OutOfMemory => new OutOfMemoryException(),
src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
2631throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (1)
83throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (2)
61throw new OutOfMemoryException(Marshal.GetPInvokeErrorMessage(errorCode)); 87throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
972throw new OutOfMemoryException();
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\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (4)
101throw new OutOfMemoryException(); 108throw new OutOfMemoryException(); 127throw new OutOfMemoryException(); 134throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (3)
955throw new OutOfMemoryException(); 2366throw new OutOfMemoryException(); 2567throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (1)
17throw new OutOfMemoryException();
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (3)
500throw new OutOfMemoryException(); 512throw new OutOfMemoryException(SR.OutOfMemory_StringTooLong); 518throw new OutOfMemoryException(SR.Lock_Enter_WaiterCountOverflow_OutOfMemoryException);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (1)
497throw new OutOfMemoryException();
System.Private.Windows.Core (2)
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (2)
30return new OutOfMemoryException(SR.GdiplusOutOfMemory); 34return new OutOfMemoryException(SR.GdiplusInsufficientBuffer);
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Modules\GetTypeCoreCache.cs (1)
129throw new OutOfMemoryException();
System.Security.Cryptography (2)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
77return new OutOfMemoryException();
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (1)
1156throw new OutOfMemoryException();
System.Security.Cryptography.ProtectedData (1)
System\Security\Cryptography\ProtectedData.cs (1)
376throw new OutOfMemoryException();
System.Text.Json (2)
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)
2161return insertIndex < 0 ? throw new OutOfMemoryException(SR.ComboBoxItemOverflow) : insertIndex; 2214throw 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)
1999throw new OutOfMemoryException(); 3202throw 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();
242 references to OutOfMemoryException
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (1)
78exception 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 ||
Microsoft.Build (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskExecutionHost_Tests.cs (1)
1054[InlineData(typeof(OutOfMemoryException), true)]
Microsoft.Build.Tasks.Core (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
Microsoft.Build.Utilities.Core (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\PatternParsingTests.cs (1)
3003catch (OutOfMemoryException)
Microsoft.CodeAnalysis.Features (2)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
711var diagnostic = (e is OutOfMemoryException) 1317if (e is OutOfMemoryException)
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\RoslynLogger.cs (1)
86catch (OutOfMemoryException)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
182catch (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.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
Microsoft.VisualStudio.LanguageServices (1)
Watson\FaultReporter.cs (1)
182catch (OutOfMemoryException)
MSBuild (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
MSBuildTaskHost (1)
ExceptionHandling.cs (1)
101if (e is OutOfMemoryException
mscorlib (1)
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\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)
Roslyn.VisualStudio.DiagnosticsWindow (2)
OptionPages\ForceLowMemoryMode.cs (2)
107catch (OutOfMemoryException) 135catch (OutOfMemoryException)
System.Data.Common (2)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
234private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException);
System\Data\DataSetUtil.cs (1)
92(e.GetType() != typeof(OutOfMemoryException)) &&
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
234private static readonly Type s_outOfMemoryType = typeof(OutOfMemoryException);
System.Drawing.Common.Tests (35)
System\Drawing\BitmapTests.cs (6)
440Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(x, y, width, height), bitmap.PixelFormat)); 441Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new RectangleF(x, y, width, height), bitmap.PixelFormat)); 456Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), format)); 457Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), format)); 464Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 465Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb));
System\Drawing\Drawing2D\BlendTests.cs (1)
35Assert.Throws<OutOfMemoryException>(() => new Blend(int.MaxValue));
System\Drawing\Drawing2D\ColorBlendTests.cs (1)
35Assert.Throws<OutOfMemoryException>(() => new ColorBlend(int.MaxValue));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (2)
69Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new Point(x, y), new Point(x, y), Color.Fuchsia, Color.GhostWhite)); 70Assert.Throws<OutOfMemoryException>(() => new LinearGradientBrush(new PointF(x, y), new PointF(x, y), Color.Fuchsia, Color.GhostWhite));
System\Drawing\Drawing2D\MatrixTests.cs (4)
147Assert.Throws<OutOfMemoryException>(() => new Matrix(new Rectangle(1, 1, 0, 1), new Point[3])); 148Assert.Throws<OutOfMemoryException>(() => new Matrix(new RectangleF(1, 1, 0, 1), new PointF[3])); 154Assert.Throws<OutOfMemoryException>(() => new Matrix(new Rectangle(1, 1, 1, 0), new Point[3])); 155Assert.Throws<OutOfMemoryException>(() => new Matrix(new RectangleF(1, 1, 1, 0), new PointF[3]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
113Assert.Throws<OutOfMemoryException>(() => new PathGradientBrush(path)); 115Assert.Throws<OutOfMemoryException>(() => new PathGradientBrush(path));
System\Drawing\GraphicsTests.cs (8)
116Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdcInternal(IntPtr.Zero)); 122Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdc(IntPtr.Zero, 10)); 128Assert.Throws<OutOfMemoryException>(() => Graphics.FromHwnd(10)); 129Assert.Throws<OutOfMemoryException>(() => Graphics.FromHwndInternal(10)); 234Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdc(10)); 235Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdcInternal(10)); 286Assert.Throws<OutOfMemoryException>(() => Graphics.FromImage(image)); 295Assert.Throws<OutOfMemoryException>(() => Graphics.FromImage(image));
System\Drawing\ImageTests.cs (2)
499Assert.Throws<OutOfMemoryException>(() => Image.FromFile(file.Path)); 500Assert.Throws<OutOfMemoryException>(() => Image.FromFile(file.Path, useEmbeddedColorManagement: true));
System\Drawing\Imaging\EncoderParameterTests.cs (1)
322Assert.Throws<OutOfMemoryException>(() => new EncoderParameter(s_anyEncoder, numberOfValues, anyType, anyValue));
System\Drawing\Imaging\ImageAttributesTests.cs (2)
1098Assert.Throws<OutOfMemoryException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath")); 1099Assert.Throws<OutOfMemoryException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath", ColorAdjustType.Default));
System\Drawing\TextureBrushTests.cs (6)
291Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, rectangle)); 292Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, (RectangleF)rectangle)); 293Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, WrapMode.Tile, rectangle)); 294Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, WrapMode.Tile, (RectangleF)rectangle)); 295Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, rectangle, null)); 296Assert.Throws<OutOfMemoryException>(() => new TextureBrush(image, (RectangleF)rectangle, null));
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.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
234catch (OutOfMemoryException)
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.Net.Http (1)
src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System.Net.HttpListener (2)
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)
120catch (OutOfMemoryException oom)
System.Net.Mail (1)
src\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System.Net.Primitives (2)
System\Net\CookieContainer.cs (2)
302catch (OutOfMemoryException) 621catch (OutOfMemoryException)
System.Net.Requests (3)
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\libraries\Common\src\System\Net\ExceptionCheck.cs (1)
8internal static bool IsFatal(Exception exception) => exception is OutOfMemoryException;
System.Net.Sockets (13)
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 (20)
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (1)
54catch (OutOfMemoryException)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (2)
226catch (OutOfMemoryException) when (!throwOnFail) 237catch (OutOfMemoryException)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
211catch (OutOfMemoryException) when (!throwOnFail) 222catch (OutOfMemoryException)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeMemory.cs (2)
15/// <exception cref="OutOfMemoryException">Allocating <paramref name="elementCount" /> * <paramref name="elementSize" /> bytes of memory failed.</exception> 30/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory failed.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeMemory.Unix.cs (5)
17/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory with <paramref name="alignment" /> failed.</exception> 77/// <exception cref="OutOfMemoryException">Reallocating <paramref name="byteCount" /> of memory with <paramref name="alignment" /> failed.</exception> 120/// <exception cref="OutOfMemoryException">Allocating <paramref name="byteCount" /> of memory failed.</exception> 143/// <exception cref="OutOfMemoryException">Allocating <paramref name="elementCount" /> * <paramref name="elementSize" /> bytes of memory failed.</exception> 190/// <exception cref="OutOfMemoryException">Reallocating <paramref name="byteCount" /> of memory failed.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (1)
376catch (OutOfMemoryException)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (4)
191/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 201/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 240/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception> 248/// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (1)
738catch (OutOfMemoryException)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
130catch (Exception ex) when (ex is IOException || ex is OutOfMemoryException)
src\System\Reflection\RuntimeCustomAttributeData.cs (1)
687catch (Exception ex) when (ex is not OutOfMemoryException)
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ExceptionUtility.cs (1)
16if ((exception is OutOfMemoryException && !(exception is InsufficientMemoryException)) ||
System.Private.Windows.Core (1)
System\ExceptionExtensions.cs (1)
19or OutOfMemoryException
System.Private.Xml (8)
System\Xml\Serialization\Compilation.cs (2)
163if (e is OutOfMemoryException) 256if (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) 899if (e is OutOfMemoryException) 1312if (e is OutOfMemoryException)
System\Xml\Serialization\XmlSerializationReader.cs (1)
1070if (e is OutOfMemoryException)
System\Xml\XmlException.cs (1)
296e is OutOfMemoryException ||
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
409[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.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.Web.Services.Description (1)
System\Web\Services\Description\ServiceDescription.cs (1)
2079if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException)
System.Windows.Forms (2)
System\Windows\Forms\Control.cs (1)
11768catch (Exception ex) when (!ex.IsCriticalException() || ex is OutOfMemoryException)
System\Windows\Forms\Rendering\GdiCache.cs (1)
57catch (OutOfMemoryException)
System.Windows.Forms.Primitives.TestUtilities (1)
PlatformDetection.cs (1)
39catch (OutOfMemoryException)
System.Windows.Forms.Tests (6)
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (6)
2214Assert.Throws<OutOfMemoryException>(() => collection.Add(1)); 3696Assert.Throws<OutOfMemoryException>(() => collection.AddRange((object[])[1])); 3697Assert.Throws<OutOfMemoryException>(() => collection.AddRange(otherCollection)); 5052Assert.Throws<OutOfMemoryException>(() => collection.Insert(0, 1)); 9019Assert.Throws<OutOfMemoryException>(() => collection.Add(1)); 10374Assert.Throws<OutOfMemoryException>(() => collection.Insert(0, 1));
System.Xaml (1)
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;