_maxRentedBufferSize up to 1MB (#12143)
This commit is contained in:
parent
01261b5f2c
commit
deb51b83f4
|
|
@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.WebUtilities
|
||||||
}
|
}
|
||||||
|
|
||||||
_bytePool = bytePool;
|
_bytePool = bytePool;
|
||||||
if (memoryThreshold < _maxRentedBufferSize)
|
if (memoryThreshold <= _maxRentedBufferSize)
|
||||||
{
|
{
|
||||||
_rentedBuffer = bytePool.Rent(memoryThreshold);
|
_rentedBuffer = bytePool.Rent(memoryThreshold);
|
||||||
_buffer = new MemoryStream(_rentedBuffer);
|
_buffer = new MemoryStream(_rentedBuffer);
|
||||||
|
|
@ -115,7 +115,7 @@ namespace Microsoft.AspNetCore.WebUtilities
|
||||||
}
|
}
|
||||||
|
|
||||||
_bytePool = bytePool;
|
_bytePool = bytePool;
|
||||||
if (memoryThreshold < _maxRentedBufferSize)
|
if (memoryThreshold <= _maxRentedBufferSize)
|
||||||
{
|
{
|
||||||
_rentedBuffer = bytePool.Rent(memoryThreshold);
|
_rentedBuffer = bytePool.Rent(memoryThreshold);
|
||||||
_buffer = new MemoryStream(_rentedBuffer);
|
_buffer = new MemoryStream(_rentedBuffer);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue