From 1219e97e27b923e0cd3fb01fe004c541dbd6749b Mon Sep 17 00:00:00 2001 From: John Luo Date: Tue, 28 Nov 2017 15:42:52 -0800 Subject: [PATCH] Avoid LOH Limit is 85000 bytes not 85*1024 bytes --- .../Streams/StreamUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.ResponseCaching/Streams/StreamUtilities.cs b/src/Microsoft.AspNetCore.ResponseCaching/Streams/StreamUtilities.cs index 4ce5a4ebe0..d128a9f8f2 100644 --- a/src/Microsoft.AspNetCore.ResponseCaching/Streams/StreamUtilities.cs +++ b/src/Microsoft.AspNetCore.ResponseCaching/Streams/StreamUtilities.cs @@ -10,10 +10,10 @@ namespace Microsoft.AspNetCore.ResponseCaching.Internal internal static class StreamUtilities { /// - /// The segment size for buffering the response body in bytes. The default is set to 84 KB. + /// The segment size for buffering the response body in bytes. The default is set to 80 KB (81920 Bytes) to avoid allocations on the LOH. /// // Internal for testing - internal static int BodySegmentSize { get; set; } = 84 * 1024; + internal static int BodySegmentSize { get; set; } = 81920; internal static IAsyncResult ToIAsyncResult(Task task, AsyncCallback callback, object state) {