diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs index c6a6c1ce3e32f..599ff04f757fd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReader.cs @@ -81,7 +81,9 @@ public abstract partial class XmlReader : IDisposable internal const int BiggerBufferSize = 8192; internal const int MaxStreamLengthForDefaultBufferSize = 64 * 1024; // 64kB - internal const int AsyncBufferSize = 64 * 1024; //64KB + // Chosen to be small enough that the character buffer in XmlTextReader when using Async = true + // is not allocated on the Large Object Heap (LOH) + internal const int AsyncBufferSize = 32 * 1024; // Settings public virtual XmlReaderSettings? Settings => null;