5 overrides of Rent
Microsoft.AspNetCore.Components.Tests (1)
Rendering\TestArrayPool.cs (1)
10public override T[] Rent(int minimumLength)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Buffers\PagedBufferedTextWriterTest.cs (2)
327public override char[] Rent(int minimumLength) 342public override char[] Rent(int minimumLength)
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
53public override T[] Rent(int minimumLength)
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
50public override T[] Rent(int minimumLength)
559 references to Rent
Microsoft.AspNetCore.Components (3)
NavigationManager.cs (1)
367var locationChangingHandlersCopy = ArrayPool<Func<LocationChangingContext, ValueTask>>.Shared.Rent(handlerCount);
Routing\RouteContext.cs (1)
61_pooled = ArrayPool<byte>.Shared.Rent(length);
src\Components\Shared\src\ArrayBuilder.cs (1)
182var newItems = _arrayPool.Rent(newCapacity);
Microsoft.AspNetCore.Components.Endpoints (4)
FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (2)
12public static PooledBuffer CreateBuffer() => new() { Data = ArrayPool<TElement>.Shared.Rent(16), Count = 0 }; 18var newBuffer = ArrayPool<TElement>.Shared.Rent(buffer.Data.Length * 2);
FormMapping\HttpContextFormValueMapper.cs (1)
130buffer = ArrayPool<char>.Shared.Rent(options.MaxKeyBufferSize);
FormMapping\PrefixResolver.cs (1)
17_sortedKeys = ArrayPool<FormKey>.Shared.Rent(count);
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
Binding\FormDataMapperTests.cs (1)
2371var result = ArrayPool<int>.Shared.Rent(size);
Microsoft.AspNetCore.Components.Forms (1)
src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
24var array = s_arrayPool.Rent(conservativeEstimatedStringLength);
Microsoft.AspNetCore.Components.Server (9)
BlazorPack\SequenceOfT.cs (1)
235segment.Assign(this.arrayPool.Rent(minBufferSize.Value == -1 ? DefaultLengthFromArrayPool : minBufferSize.Value));
ComponentHub.cs (1)
282var buffer = ArrayPool<byte>.Shared.Rent(32 * 1024);
src\Components\Shared\src\ArrayBuilder.cs (1)
182var newItems = _arrayPool.Rent(newCapacity);
src\Shared\PooledArrayBufferWriter.cs (3)
19_rentedBuffer = ArrayPool<T>.Shared.Rent(MinimumBufferSize); 27_rentedBuffer = ArrayPool<T>.Shared.Rent(initialCapacity); 163_rentedBuffer = ArrayPool<T>.Shared.Rent(newSize);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (1)
1102char[] charArray = ArrayPool<char>.Shared.Rent(maxCharLength);
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackWriter.cs (1)
1302var buffer = ArrayPool<byte>.Shared.Rent((int)sourceBytesToCopy);
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (1)
24var array = s_arrayPool.Rent(conservativeEstimatedStringLength);
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
17var buffer = ArrayPool<byte>.Shared.Rent(32 * 1024);
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\ArrayBuilder.cs (1)
182var newItems = _arrayPool.Rent(newCapacity);
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
17var buffer = ArrayPool<byte>.Shared.Rent(32 * 1024);
Microsoft.AspNetCore.DataProtection.Abstractions (1)
src\Shared\WebEncoders\WebEncoders.cs (1)
329: bufferToReturnToPool = ArrayPool<char>.Shared.Rent(bufferSize);
Microsoft.AspNetCore.Http (1)
src\Http\Shared\StreamCopyOperationInternal.cs (1)
36var buffer = ArrayPool<byte>.Shared.Rent(bufferSize);
Microsoft.AspNetCore.Http.Abstractions (1)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
91T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
Microsoft.AspNetCore.Http.Connections (2)
src\Shared\WebEncoders\WebEncoders.cs (1)
329: bufferToReturnToPool = ArrayPool<char>.Shared.Rent(bufferSize);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.Http.Extensions (8)
RequestDelegateFactory.cs (1)
2199buffer = ArrayPool<char>.Shared.Rent(maxKeyBufferSize);
src\Components\Endpoints\src\FormMapping\Converters\CollectionAdapters\ArrayPoolBufferAdapter.cs (2)
12public static PooledBuffer CreateBuffer() => new() { Data = ArrayPool<TElement>.Shared.Rent(16), Count = 0 }; 18var newBuffer = ArrayPool<TElement>.Shared.Rent(buffer.Data.Length * 2);
src\Components\Endpoints\src\FormMapping\PrefixResolver.cs (1)
17_sortedKeys = ArrayPool<FormKey>.Shared.Rent(count);
src\Http\Shared\StreamCopyOperationInternal.cs (1)
36var buffer = ArrayPool<byte>.Shared.Rent(bufferSize);
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
91T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (2)
27_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 293char[] poolArray = ArrayPool<char>.Shared.Rent((int)Math.Max((uint)(_pos + additionalCapacityBeyondPos), (uint)_chars.Length * 2));
Microsoft.AspNetCore.Http.Results (1)
src\Http\Shared\StreamCopyOperationInternal.cs (1)
36var buffer = ArrayPool<byte>.Shared.Rent(bufferSize);
Microsoft.AspNetCore.HttpLogging (4)
BufferingStream.cs (1)
169newSegment.SetOwnedMemory(ArrayPool<byte>.Shared.Rent(GetSegmentSize(sizeHint)));
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
91T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (2)
27_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 293char[] poolArray = ArrayPool<char>.Shared.Rent((int)Math.Max((uint)(_pos + additionalCapacityBeyondPos), (uint)_chars.Length * 2));
Microsoft.AspNetCore.Mvc.Core.Test (1)
ContentResultTest.cs (1)
263.Setup(ap => ap.Rent(DefaultCharacterChunkSize))
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
JsonArrayPool.cs (1)
22return _inner.Rent(minimumLength);
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
Buffers\ArrayPoolBufferSource.cs (1)
17public char[] Rent(int bufferSize) => _pool.Rent(bufferSize);
Buffers\MemoryPoolViewBufferScope.cs (1)
58segment = _viewBufferPool.Rent(Math.Max(pageSize, MinimumSize));
src\Shared\PooledArrayBufferWriter.cs (3)
19_rentedBuffer = ArrayPool<T>.Shared.Rent(MinimumBufferSize); 27_rentedBuffer = ArrayPool<T>.Shared.Rent(initialCapacity); 163_rentedBuffer = ArrayPool<T>.Shared.Rent(newSize);
Microsoft.AspNetCore.OpenApi (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.OutputCaching (4)
OutputCacheEntry.cs (1)
90var arr = ArrayPool<(string, StringValues)>.Shared.Rent(count);
OutputCacheEntryFormatter.cs (2)
80lease = ArrayPool<string>.Shared.Rent(tags.Count); 267var headerArr = ArrayPool<(string Name, StringValues Values)>.Shared.Rent(headersCount);
RecyclableArrayBufferWriter.cs (1)
119_buffer = ArrayPool<T>.Shared.Rent(newSize);
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (3)
EndToEndBenchmarks.cs (3)
52_payloadOversized = ArrayPool<byte>.Shared.Rent(PayloadLength); 207var oversized = ArrayPool<byte>.Shared.Rent(PayloadLength); 277public NullPipeWriter(int size) => _buffer = ArrayPool<byte>.Shared.Rent(size);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
257leased = ArrayPool<byte>.Shared.Rent(len);
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheEntryFormatterTests.cs (1)
199lease = ArrayPool<byte>.Shared.Rent(len);
Microsoft.AspNetCore.Owin (1)
WebSockets\OwinWebSocketAdapter.cs (1)
138var buffer = ArrayPool<byte>.Shared.Rent(_rentedBufferSize);
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Internal\Http\Http1OutputProducer.cs (1)
692return _fakeMemory = ArrayPool<byte>.Shared.Rent(minSize);
Internal\Http\HttpParser.cs (1)
416Span<byte> headerSpan = headerLength <= 256 ? stackalloc byte[256] : array = ArrayPool<byte>.Shared.Rent(headerLength);
Internal\Http2\Http2OutputProducer.cs (1)
680return _fakeMemory = ArrayPool<byte>.Shared.Rent(minSize);
Internal\Http3\Http3OutputProducer.cs (1)
254return _fakeMemory = ArrayPool<byte>.Shared.Rent(minSize);
Internal\Infrastructure\PipeWriterHelpers\ConcurrentPipeWriter.cs (1)
358newSegment.SetOwnedMemory(ArrayPool<byte>.Shared.Rent(minSize));
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (2)
672buffer = Pool.Rent(requiredLength); 676byte[] newBuffer = Pool.Rent(requiredLength);
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (2)
672buffer = Pool.Rent(requiredLength); 676byte[] newBuffer = Pool.Rent(requiredLength);
src\Shared\WebEncoders\WebEncoders.cs (1)
329: bufferToReturnToPool = ArrayPool<char>.Shared.Rent(bufferSize);
Microsoft.AspNetCore.SignalR.Client.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Common (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\MemoryBufferWriterTests.cs (1)
20var buffer = ArrayPool<byte>.Shared.Rent(1);
Microsoft.AspNetCore.SignalR.Core (1)
Internal\Utf8HashLookup.cs (1)
84(pooled = ArrayPool<char>.Shared.Rent(count));
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
src\SignalR\common\Shared\JsonUtils.cs (1)
209return _inner.Rent(minimumLength);
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
187_currentSegment = ArrayPool<byte>.Shared.Rent(Math.Max(_minimumSegmentSize, sizeHint));
Microsoft.AspNetCore.WebSockets (3)
src\Shared\ValueStringBuilder\ValueListBuilder.cs (1)
91T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
src\Shared\ValueStringBuilder\ValueStringBuilder.cs (2)
27_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 293char[] poolArray = ArrayPool<char>.Shared.Rent((int)Math.Max((uint)(_pos + additionalCapacityBeyondPos), (uint)_chars.Length * 2));
Microsoft.AspNetCore.WebUtilities (18)
BufferedReadStream.cs (1)
47_buffer = bytePool.Rent(bufferSize);
FileBufferingReadStream.cs (5)
82_rentedBuffer = bytePool.Rent(memoryThreshold); 134_rentedBuffer = bytePool.Rent(memoryThreshold); 284var rentedBuffer = _bytePool.Rent(Math.Min((int)oldBuffer.Length, _maxRentedBufferSize)); 359var rentedBuffer = _bytePool.Rent(Math.Min((int)oldBuffer.Length, _maxRentedBufferSize)); 443byte[] buffer = _bytePool.Rent(bufferSize);
FormPipeReader.cs (1)
360var byteArray = ArrayPool<byte>.Shared.Rent((int)ros.Length);
FormReader.cs (2)
64_buffer = charPool.Rent(_rentedCharPoolLength); 99_buffer = charPool.Rent(_rentedCharPoolLength);
HttpRequestStreamReader.cs (2)
86_byteBuffer = _bytePool.Rent(bufferSize); 91_charBuffer = _charPool.Rent(requiredLength);
HttpResponseStreamWriter.cs (2)
82_charBuffer = charPool.Rent(bufferSize); 87_byteBuffer = bytePool.Rent(requiredLength);
MultipartReaderStream.cs (2)
216var boundary = stream._bytePool.Rent(length); 302var boundary = stream._bytePool.Rent(length);
PagedByteBuffer.cs (1)
34_currentPage = _arrayPool.Rent(PageSize);
src\Shared\WebEncoders\WebEncoders.cs (1)
329: bufferToReturnToPool = ArrayPool<char>.Shared.Rent(bufferSize);
StreamHelperExtensions.cs (1)
58var buffer = bytePool.Rent(_maxReadBufferSize);
Microsoft.AspNetCore.WebUtilities.Tests (14)
FileBufferingReadStreamTests.cs (8)
409arrayPool.Setup(p => p.Rent(It.IsAny<int>())) 410.Returns((int m) => ArrayPool<byte>.Shared.Rent(m)); 416arrayPool.Verify(v => v.Rent(It.IsAny<int>()), Times.Never()); 425arrayPool.Verify(v => v.Rent(It.IsAny<int>()), Times.Once()); 438arrayPool.Setup(p => p.Rent(It.IsAny<int>())) 439.Returns((int m) => ArrayPool<byte>.Shared.Rent(m)); 445arrayPool.Verify(v => v.Rent(It.IsAny<int>()), Times.Never()); 454arrayPool.Verify(v => v.Rent(It.IsAny<int>()), Times.Once());
PagedByteBufferTest.cs (6)
173arrayPool.Setup(p => p.Rent(PagedByteBuffer.PageSize)) 188arrayPool.Verify(p => p.Rent(It.IsAny<int>()), Times.Once()); 199arrayPool.Setup(p => p.Rent(PagedByteBuffer.PageSize)) 213arrayPool.Verify(p => p.Rent(It.IsAny<int>()), Times.Once()); 223arrayPool.Setup(p => p.Rent(PagedByteBuffer.PageSize)) 233arrayPool.Verify(p => p.Rent(It.IsAny<int>()), Times.Exactly(4));
Microsoft.Build (3)
InterningBinaryReader.cs (1)
156resultBuffer ??= ArrayPool<char>.Shared.Rent(stringLength); // Actual string length in chars may be smaller.
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (1)
33byte[] buffer = ArrayPool<byte>.Shared.Rent(4096);
Logging\OptimizedStringIndenter.cs (1)
139pooledArray = ArrayPool<StringSegment>.Shared.Rent(segmentCount);
Microsoft.Build.Tasks.Core (3)
Hash.cs (2)
75shaBuffer = System.Buffers.ArrayPool<byte>.Shared.Rent(ShaBufferSize); 76itemSpecChunkByteBuffer = System.Buffers.ArrayPool<byte>.Shared.Rent(s_encoding.GetMaxByteCount(MaxInputChunkLength));
InterningBinaryReader.cs (1)
156resultBuffer ??= ArrayPool<char>.Shared.Rent(stringLength); // Actual string length in chars may be smaller.
Microsoft.Extensions.Caching.Hybrid (1)
Internal\RecyclableArrayBufferWriter.cs (1)
188_buffer = ArrayPool<T>.Shared.Rent(newSize);
Microsoft.Extensions.Caching.MicroBenchmarks (1)
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (1)
188_buffer = ArrayPool<T>.Shared.Rent(newSize);
Microsoft.Extensions.Caching.SqlServer (2)
DatabaseOperations.cs (1)
334lease ??= ArrayPool<byte>.Shared.Rent(DefaultPageSize);
SqlServerCache.cs (1)
250lease = ArrayPool<byte>.Shared.Rent(length);
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
139lease = ArrayPool<byte>.Shared.Rent(length);
Microsoft.Extensions.DependencyModel (3)
DependencyContextJsonReader.cs (3)
67rented = ArrayPool<byte>.Shared.Rent(checked((int)expectedLength)); 71rented = ArrayPool<byte>.Shared.Rent(UnseekableStreamInitialRentSize); 103rented = ArrayPool<byte>.Shared.Rent(checked(toReturn.Length * 2));
Microsoft.Extensions.Logging.Abstractions (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
Microsoft.Extensions.Logging.Console (3)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (3)
40_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 124_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 206_rentedBuffer = ArrayPool<byte>.Shared.Rent(newSize);
Microsoft.Extensions.Logging.Generators (1)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (1)
223var buffer = ArrayPool<byte>.Shared.Rent(count);
src\Components\Shared\src\ArrayBuilder.cs (1)
182var newItems = _arrayPool.Rent(newCapacity);
Microsoft.Net.Http.Headers (2)
ContentDispositionHeaderValue.cs (2)
552: bufferFromPool = ArrayPool<byte>.Shared.Rent(requiredLength); 720unescapedBytes = ArrayPool<byte>.Shared.Rent(dataString.Length);
MonoTargetsTasks (1)
ILStrip\ILStrip.cs (1)
344zeroBuffer = ArrayPool<byte>.Shared.Rent(methodSize);
MSBuild (1)
InterningBinaryReader.cs (1)
156resultBuffer ??= ArrayPool<char>.Shared.Rent(stringLength); // Actual string length in chars may be smaller.
PresentationCore (2)
System\Windows\Media\RenderData.cs (2)
474_buffer = ArrayPool<byte>.Shared.Rent(cbRequiredSize); 491byte[] newBuffer = ArrayPool<byte>.Shared.Rent(newSize);
PresentationFramework (1)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1117byte[] pooledArray = ArrayPool<byte>.Shared.Rent(toRead);
System.Collections.Immutable (10)
System\Collections\Frozen\FrozenHashTable.cs (2)
59int[] arrayPoolBuckets = ArrayPool<int>.Shared.Rent(numBuckets + hashCodes.Length); 214int[] seenBuckets = ArrayPool<int>.Shared.Rent((maxNumBuckets / BitsPerInt32) + 1);
System\Collections\Frozen\FrozenSetInternalBase.cs (1)
200(rentedArray = ArrayPool<int>.Shared.Rent(intArrayLength));
System\Collections\Frozen\Int32\Int32FrozenDictionary.cs (1)
31int[] arrayPoolHashCodes = ArrayPool<int>.Shared.Rent(entries.Length);
System\Collections\Frozen\Int32\Int32FrozenSet.cs (1)
25int[] entries = ArrayPool<int>.Shared.Rent(count);
System\Collections\Frozen\ItemsFrozenSet.cs (1)
26int[] arrayPoolHashCodes = ArrayPool<int>.Shared.Rent(entries.Length);
System\Collections\Frozen\KeysAndValuesFrozenDictionary.cs (1)
28int[] arrayPoolHashCodes = ArrayPool<int>.Shared.Rent(entries.Length);
System\Collections\Frozen\String\LengthBuckets.cs (1)
47int[] buckets = ArrayPool<int>.Shared.Rent(arraySize);
System\Collections\Frozen\String\OrdinalStringFrozenDictionary.cs (1)
43int[] arrayPoolHashCodes = ArrayPool<int>.Shared.Rent(keys.Length);
System\Collections\Frozen\String\OrdinalStringFrozenSet.cs (1)
34int[] arrayPoolHashCodes = ArrayPool<int>.Shared.Rent(entries.Length);
System.Console (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System\IO\CachedConsoleStream.cs (1)
29Span<char> charSpan = maxCharCount <= 512 ? stackalloc char[512] : (pooledBuffer = ArrayPool<char>.Shared.Rent(maxCharCount));
System.Diagnostics.DiagnosticSource (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System.Diagnostics.Process (7)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
121byte[] bytes = ArrayPool<byte>.Shared.Rent(4096); 140byte[] temp = ArrayPool<byte>.Shared.Rent(bytes.Length * 2);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadLink.cs (1)
74arrayBuffer = ArrayPool<byte>.Shared.Rent(spanBuffer.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\Common\src\System\Text\ValueUtf8Converter.cs (1)
30_arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(maxSize);
System\Diagnostics\Process.Linux.cs (1)
281byte[] tmp = ArrayPool<byte>.Shared.Rent((int)newLength);
System.Formats.Asn1 (1)
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
13internal static byte[] Rent(int minimumLength) => ArrayPool<byte>.Shared.Rent(minimumLength);
System.Formats.Cbor (2)
System\Formats\Cbor\Writer\CborWriter.Map.cs (1)
161byte[] tempBuffer = s_bufferPool.Rent(totalMapPayloadEncodingLength);
System\Formats\Cbor\Writer\CborWriter.String.cs (1)
215byte[] tempBuffer = s_bufferPool.Rent(definiteLength);
System.Formats.Tar (16)
src\libraries\Common\src\System\IO\Archiving.Utils.cs (1)
24buffer = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System\Formats\Tar\TarHeader.Read.cs (5)
45byte[] rented = ArrayPool<byte>.Shared.Rent(minimumLength: TarHelpers.RecordSize); 575(buffer = ArrayPool<byte>.Shared.Rent((int)_size)); 597byte[] buffer = ArrayPool<byte>.Shared.Rent((int)_size); 645(buffer = ArrayPool<byte>.Shared.Rent((int)_size)); 668byte[] buffer = ArrayPool<byte>.Shared.Rent((int)_size);
System\Formats\Tar\TarHeader.Write.cs (2)
815byte[] buffer = ArrayPool<byte>.Shared.Rent(paddingAfterData); 863span = buffer = ArrayPool<byte>.Shared.Rent(length);
System\Formats\Tar\TarHelpers.cs (4)
61byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 83byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToDiscard)); 97byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy)); 113byte[] buffer = ArrayPool<byte>.Shared.Rent(minimumLength: (int)Math.Min(MaxBufferLength, bytesToCopy));
System\Formats\Tar\TarWriter.cs (2)
322byte[] rented = ArrayPool<byte>.Shared.Rent(minimumLength: TarHelpers.RecordSize); 360byte[] twoEmptyRecords = ArrayPool<byte>.Shared.Rent(TwoRecordSize);
System.IO.Compression (2)
System\IO\Compression\DeflateZLib\DeflateStream.cs (2)
109_buffer = ArrayPool<byte>.Shared.Rent(DefaultBufferSize); 893_arrayPoolBuffer = ArrayPool<byte>.Shared.Rent(bufferSize);
System.IO.Compression.Brotli (1)
System\IO\Compression\BrotliStream.cs (1)
59_buffer = ArrayPool<byte>.Shared.Rent(DefaultInternalBufferSize);
System.IO.Compression.ZipFile (1)
src\libraries\Common\src\System\IO\Archiving.Utils.cs (1)
24buffer = ArrayPool<char>.Shared.Rent(newCapacity);
System.IO.FileSystem.Watcher (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System.IO.Hashing (2)
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (2)
110byte[] buffer = ArrayPool<byte>.Shared.Rent(4096); 155byte[] buffer = ArrayPool<byte>.Shared.Rent(4096);
System.IO.Pipelines (3)
System\IO\Pipelines\Pipe.cs (1)
253segment.SetOwnedMemory(ArrayPool<byte>.Shared.Rent(sizeToRequest));
System\IO\Pipelines\StreamPipeReader.cs (1)
528nextSegment.SetOwnedMemory(ArrayPool<byte>.Shared.Rent(sizeToRequest));
System\IO\Pipelines\StreamPipeWriter.cs (1)
167newSegment.SetOwnedMemory(ArrayPool<byte>.Shared.Rent(sizeToRequest));
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
333_currentSegment = _segments[_segmentsCount] = ArrayPool<T>.Shared.Rent(newSegmentLength);
System.Memory (3)
System\Buffers\ArrayMemoryPool.ArrayMemoryPoolBuffer.cs (1)
14_array = ArrayPool<T>.Shared.Rent(size);
System\Text\EncodingExtensions.cs (2)
178byte[] rentedArray = ArrayPool<byte>.Shared.Rent(byteCountThisIteration); 365char[] rentedArray = ArrayPool<char>.Shared.Rent(charCountThisIteration);
System.Net.Http (19)
src\libraries\Common\src\System\Net\ArrayBuffer.cs (3)
39: usePool ? ArrayPool<byte>.Shared.Rent(initialSize) : new byte[initialSize]; 132_bytes = ArrayPool<byte>.Shared.Rent(byteCount); 156ArrayPool<byte>.Shared.Rent(newSize) :
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (2)
672buffer = Pool.Rent(requiredLength); 676byte[] newBuffer = Pool.Rent(requiredLength);
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (1)
231_blocks[allocatedBlockCount++] = ArrayPool<byte>.Shared.Rent(BlockSize);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System\Net\Http\Headers\HeaderDescriptor.cs (1)
262char[] rented = ArrayPool<char>.Shared.Rent(input.Length);
System\Net\Http\Headers\HeaderUtilities.cs (1)
71byte[] utf8bytes = ArrayPool<byte>.Shared.Rent(Encoding.UTF8.GetMaxByteCount(input.Length));
System\Net\Http\HttpContent.cs (2)
945_buffer = ArrayPool<byte>.Shared.Rent((int)capacity); 999byte[] newBuffer = ArrayPool<byte>.Shared.Rent(newCapacity);
System\Net\Http\MultipartContent.cs (1)
651: (rentedBuffer = ArrayPool<byte>.Shared.Rent(maxLength));
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (1)
404HttpConnection[] stackCopy = ArrayPool<HttpConnection>.Shared.Rent(pool._associatedHttp11ConnectionCount);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
1188byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferSize); 1224byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferSize);
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1935byte[] pooledBuffer = ArrayPool<byte>.Shared.Rent(desiredBufferSize);
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (2)
67byte[] buffer = ArrayPool<byte>.Shared.Rent(BufferSize); 215byte[] buffer = ArrayPool<byte>.Shared.Rent(BufferSize);
System.Net.Mail (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System.Net.Ping (1)
src\libraries\Common\src\System\Text\ValueUtf8Converter.cs (1)
30_arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(maxSize);
System.Net.Quic (8)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
34byte[] buffer = ArrayPool<byte>.Shared.Rent(1024);
src\libraries\Common\src\System\Net\ArrayBuffer.cs (3)
39: usePool ? ArrayPool<byte>.Shared.Rent(initialSize) : new byte[initialSize]; 132_bytes = ArrayPool<byte>.Shared.Rent(byteCount); 156ArrayPool<byte>.Shared.Rent(newSize) :
src\libraries\Common\src\System\Net\MultiArrayBuffer.cs (1)
231_blocks[allocatedBlockCount++] = ArrayPool<byte>.Shared.Rent(BlockSize);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (2)
102certDataRented = ArrayPool<byte>.Shared.Rent((int)certificateBuffer->Length); 109chainDataRented = ArrayPool<byte>.Shared.Rent((int)chainBuffer->Length);
System\Net\Quic\QuicStream.Stream.cs (1)
118byte[] rentedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length);
System.Net.Security (12)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
34byte[] buffer = ArrayPool<byte>.Shared.Rent(1024);
src\libraries\Common\src\System\Net\ArrayBuffer.cs (3)
39: usePool ? ArrayPool<byte>.Shared.Rent(initialSize) : new byte[initialSize]; 132_bytes = ArrayPool<byte>.Shared.Rent(byteCount); 156ArrayPool<byte>.Shared.Rent(newSize) :
src\libraries\Common\src\System\Net\Security\RC4.cs (1)
46state = ArrayPool<byte>.Shared.Rent(256);
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
13internal static byte[] Rent(int minimumLength) => ArrayPool<byte>.Shared.Rent(minimumLength);
src\libraries\Common\src\System\Text\UrlBase64Encoding.cs (2)
18char[] base64 = ArrayPool<char>.Shared.Rent(base64Len); 30char[] urlEncoded = ArrayPool<char>.Shared.Rent(urlEncodedLen);
System\Net\Security\SslStream.Protocol.cs (2)
1367Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size) : new byte[Size]; 1381Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size + size) : new byte[Size + size];
System\Net\Security\SslStreamCertificateContext.Linux.cs (2)
266IntPtr[] issuerHandles = ArrayPool<IntPtr>.Shared.Rent(_privateIntermediateCertificates.Length + 1); 284byte[] rentedBytes = ArrayPool<byte>.Shared.Rent(Interop.Crypto.GetOcspRequestDerSize(ocspRequest));
System.Net.WebSockets (11)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (2)
49_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(payload.Length, MinInitialBufferLength)); 67byte[] newBuffer = ArrayPool<byte>.Shared.Rent((int)(_buffer.Length * 1.3));
System\Net\WebSockets\Compression\WebSocketInflater.cs (3)
83_buffer = ArrayPool<byte>.Shared.Rent((int)Math.Min(userBufferLength, payloadLength)); 100_buffer = ArrayPool<byte>.Shared.Rent(FlushMarkerLength); 108byte[] newBuffer = ArrayPool<byte>.Shared.Rent(_available + FlushMarkerLength);
System\Net\WebSockets\ManagedWebSocket.cs (4)
1291byte[] closeBuffer = ArrayPool<byte>.Shared.Rent(MaxMessageHeaderLength + MaxControlPayloadLength); 1356buffer = ArrayPool<byte>.Shared.Rent(count); 1361buffer = ArrayPool<byte>.Shared.Rent(count); 1451_sendBuffer = ArrayPool<byte>.Shared.Rent(minLength);
System\Net\WebSockets\WebSocket.cs (2)
43byte[] array = ArrayPool<byte>.Shared.Rent(buffer.Length); 72byte[] array = ArrayPool<byte>.Shared.Rent(buffer.Length);
System.Private.CoreLib (67)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
121byte[] bytes = ArrayPool<byte>.Shared.Rent(4096); 140byte[] temp = ArrayPool<byte>.Shared.Rent(bytes.Length * 2);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetCwd.cs (1)
30byte[] buf = ArrayPool<byte>.Shared.Rent(bufferSize);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadLink.cs (1)
74arrayBuffer = ArrayPool<byte>.Shared.Rent(spanBuffer.Length * 2);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\Common\src\System\Text\ValueUtf8Converter.cs (1)
30_arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(maxSize);
src\libraries\System.Private.CoreLib\src\System\Buffers\ArrayPool.cs (6)
32/// array than was requested. Renting a buffer from it with <see cref="Rent"/> will result in an 72/// <see cref="Return"/> so that it may be reused in subsequent usage of <see cref="Rent"/>. 80/// Returns to the pool an array that was previously obtained via <see cref="Rent"/> on the same 84/// The buffer previously obtained from <see cref="Rent"/> to return to the pool. 88/// will clear <paramref name="array"/> of its contents so that a subsequent consumer via <see cref="Rent"/> 94/// and must not use it. The reference returned from a given call to <see cref="Rent"/> must only be
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (2)
894: (borrowedArray = ArrayPool<byte>.Shared.Rent(sortKeyLength)); 919sortKey = (borrowedArray = ArrayPool<byte>.Shared.Rent(sortKeyLength));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (1)
158(borrowedArr = ArrayPool<byte>.Shared.Rent(sortKeyLength));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Utf8.cs (2)
92sourceUtf16Array = ArrayPool<char>.Shared.Rent(sourceMaxCharCount); 123prefixUtf16Array = ArrayPool<char>.Shared.Rent(prefixMaxCharCount);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (2)
55: (toReturn = ArrayPool<char>.Shared.Rent(strInput.Length)); 98buffer = toReturn = ArrayPool<char>.Shared.Rent(realLen);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (2)
74: (toReturn = ArrayPool<char>.Shared.Rent(strInput.Length)); 109buffer = toReturn = ArrayPool<char>.Shared.Rent(realLength);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
509byte[] buffer = ArrayPool<byte>.Shared.Rent(numBytes);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (4)
198rented = ArrayPool<byte>.Shared.Rent(maxByteCount); 367byte[] rented = ArrayPool<byte>.Shared.Rent(value.Length * 3); // max expansion: each char -> 3 bytes 430rented = ArrayPool<byte>.Shared.Rent(maxByteCount); 443rented = ArrayPool<byte>.Shared.Rent(MaxArrayPoolRentalSize);
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (2)
47_pathBuffer = ArrayPool<char>.Shared.Rent(StandardBufferSize); 49_entryBuffer = size > 0 ? ArrayPool<byte>.Shared.Rent(size) : null;
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (6)
936buffer = ArrayPool<char>.Shared.Rent(sr.CurrentEncoding.GetMaxCharCount(DefaultBufferSize)); 1024byte[] rentedArray = ArrayPool<byte>.Shared.Rent(512); 1038byte[] tmp = ArrayPool<byte>.Shared.Rent((int)newLength); 1241byte[] tmp = ArrayPool<byte>.Shared.Rent((int)newLength); 1289Span<byte> bytes = bytesNeeded <= 1024 ? stackalloc byte[1024] : (rentedBytes = ArrayPool<byte>.Shared.Rent(bytesNeeded)); 1344byte[] bytes = ArrayPool<byte>.Shared.Rent(preambleSize + encoding.GetMaxByteCount(Math.Min(contents.Length, ChunkSize)));
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (5)
64byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferSize); 102byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferSize); 315byte[] sharedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length); 745byte[] sharedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length); 790byte[] sharedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
962arrayPoolBuffer = ArrayPool<char>.Shared.Rent(charLen - charPos + 80); 966char[] newBuffer = ArrayPool<char>.Shared.Rent(checked(arrayPoolBufferPos + charLen - charPos));
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (3)
98char[] array = ArrayPool<char>.Shared.Rent(buffer.Length); 148char[] array = ArrayPool<char>.Shared.Rent(buffer.Length); 244char[] chars = ArrayPool<char>.Shared.Rent(4096);
src\libraries\System.Private.CoreLib\src\System\Marvin.OrdinalIgnoreCase.cs (1)
86Span<char> scratch = (uint)count <= 64 ? stackalloc char[64] : (borrowedArr = ArrayPool<char>.Shared.Rent(count));
src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (5)
305utf16TextArray = ArrayPool<char>.Shared.Rent(textMaxCharCount); 439utf16TextArray = ArrayPool<char>.Shared.Rent(textMaxCharCount); 485utf16DestinationArray = ArrayPool<char>.Shared.Rent(destinationMaxCharCount); 541utf16TextArray = ArrayPool<char>.Shared.Rent(textMaxCharCount); 588utf16TextArray = ArrayPool<char>.Shared.Rent(textMaxCharCount);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (3)
58_chars = _arrayToReturnToPool = ArrayPool<char>.Shared.Rent(GetDefaultLength(literalLength, formattedCount)); 71_chars = _arrayToReturnToPool = ArrayPool<char>.Shared.Rent(GetDefaultLength(literalLength, formattedCount)); 634char[] newArray = ArrayPool<char>.Shared.Rent(arraySize);
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (1)
906stackalloc char[64] : (borrowedArr = ArrayPool<char>.Shared.Rent(length + 1));
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (8)
310byte[] rentedBytes = ArrayPool<byte>.Shared.Rent(DefaultReadByteBufferSize); 311char[] rentedChars = ArrayPool<char>.Shared.Rent(_readCharBufferMaxSize); 389byte[] rentedBytes = ArrayPool<byte>.Shared.Rent(DefaultReadByteBufferSize); 390char[] rentedChars = ArrayPool<char>.Shared.Rent(_readCharBufferMaxSize); 486char[] scratchChars = ArrayPool<char>.Shared.Rent(rentalLength); 487byte[] scratchBytes = ArrayPool<byte>.Shared.Rent(rentalLength); 562char[] scratchChars = ArrayPool<char>.Shared.Rent(rentalLength); 563byte[] scratchBytes = ArrayPool<byte>.Shared.Rent(rentalLength);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (2)
698char[] array = ArrayPool<char>.Shared.Rent(length); 745char[] array = ArrayPool<char>.Shared.Rent(length);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (1)
272byte[] dirBuffer = ArrayPool<byte>.Shared.Rent(bufferSize);
System.Private.CoreLib.Generators (1)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
System.Private.Uri (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System.Private.Xml (2)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System.Reflection.Metadata (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs (1)
45byte[] buffer = ArrayPool<byte>.Shared.Rent(prefixedByteCount);
System.Runtime.Numerics (77)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
System\Number.BigInteger.cs (9)
94buffer = arrayFromPool = ArrayPool<byte>.Shared.Rent(value.Length + 1 + 1); 437arrayFromPoolForResultBuffer = ArrayPool<int>.Shared.Rent(bufferSize); 489arrayFromPoolForMultiplier = ArrayPool<int>.Shared.Rent(blockSize); 551arrayFromPoolForMultiplier = ArrayPool<int>.Shared.Rent(blockSize); 645arrayFromPoolForResultBuffer = ArrayPool<int>.Shared.Rent(checked(currentBufferSize * 2)); 670bits = arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(bytesWrittenOrNeeded); 751bytes = arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(bytesWrittenOrNeeded); 906(bufferToReturn = ArrayPool<uint>.Shared.Rent(cuMax)); 984(numberBufferToReturn = ArrayPool<byte>.Shared.Rent(valueDigits + 1));
System\Numerics\BigInteger.cs (43)
769: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 799: remainderFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 805: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 922: bitsFromPool = ArrayPool<uint>.Shared.Rent(leftBits.Length)).Slice(0, leftBits.Length); 935: bitsFromPool = ArrayPool<uint>.Shared.Rent(leftBits.Length)).Slice(0, leftBits.Length); 990: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1050: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1061: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1651: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1663: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1675: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1687: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1729: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1741: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1751: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 1763: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2340: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2347: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2354: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2396: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2403: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2410: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2447: leftBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2454: rightBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2461: resultBufferFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2501: xdFromPool = ArrayPool<uint>.Shared.Rent(xl)).Slice(0, xl); 2508: zdFromPool = ArrayPool<uint>.Shared.Rent(zl)).Slice(0, zl); 2562: xdFromPool = ArrayPool<uint>.Shared.Rent(xl)).Slice(0, xl); 2590: zdFromPool = ArrayPool<uint>.Shared.Rent(zl)).Slice(0, zl); 2704: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2716: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2726: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2738: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2751: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2793: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2819: quotientFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 2869: bitsFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 3253: xdFromPool = ArrayPool<uint>.Shared.Rent(xl); 3263: zdFromPool = ArrayPool<uint>.Shared.Rent(zl); 3388: xdFromPool = ArrayPool<uint>.Shared.Rent(xl); 3398: zdFromPool = ArrayPool<uint>.Shared.Rent(zl); 5233: xdFromPool = ArrayPool<uint>.Shared.Rent(xl)).Slice(0, xl); 5252: zdFromPool = ArrayPool<uint>.Shared.Rent(zl)).Slice(0, zl);
System\Numerics\BigIntegerCalculator.DivRem.cs (1)
91: leftCopyFromPool = ArrayPool<uint>.Shared.Rent(left.Length)).Slice(0, left.Length);
System\Numerics\BigIntegerCalculator.GcdInv.cs (1)
69: rightCopyFromPool = ArrayPool<uint>.Shared.Rent(right.Length)).Slice(0, right.Length);
System\Numerics\BigIntegerCalculator.PowMod.cs (14)
28: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length); 34: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length); 221: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 240: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length); 270: valueCopyFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 289: tempFromPool = ArrayPool<uint>.Shared.Rent(bits.Length)).Slice(0, bits.Length); 328: rFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 335: muFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 342: q1FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 348: q2FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 388: rFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 395: muFromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 402: q1FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size); 408: q2FromPool = ArrayPool<uint>.Shared.Rent(size)).Slice(0, size);
System\Numerics\BigIntegerCalculator.SquMul.cs (6)
102: foldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength); 109: coreFromPool = ArrayPool<uint>.Shared.Rent(coreLength)).Slice(0, coreLength); 227: carryFromPool = ArrayPool<uint>.Shared.Rent(carryLength)).Slice(0, carryLength); 286: leftFoldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength); 292: rightFoldFromPool = ArrayPool<uint>.Shared.Rent(foldLength)).Slice(0, foldLength); 305: coreFromPool = ArrayPool<uint>.Shared.Rent(coreLength)).Slice(0, coreLength);
System.Security.Cryptography (43)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadLink.cs (1)
74arrayBuffer = ArrayPool<byte>.Shared.Rent(spanBuffer.Length * 2);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (1)
34byte[] buffer = ArrayPool<byte>.Shared.Rent(1024);
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
13internal static byte[] Rent(int minimumLength) => ArrayPool<byte>.Shared.Rent(minimumLength);
src\libraries\Common\src\System\Text\UrlBase64Encoding.cs (2)
18char[] base64 = ArrayPool<char>.Shared.Rent(base64Len); 30char[] urlEncoded = ArrayPool<char>.Shared.Rent(urlEncodedLen);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\Common\src\System\Text\ValueUtf8Converter.cs (1)
30_arrayToReturnToPool = ArrayPool<byte>.Shared.Rent(maxSize);
System\Security\Cryptography\CryptoStream.cs (7)
345byte[] tempInputBuffer = ArrayPool<byte>.Shared.Rent(numWholeBlocksInBytes); 387byte[] tempOutputBuffer = ArrayPool<byte>.Shared.Rent(numWholeReadBlocks * _outputBlockSize); 508byte[] sharedBuffer = ArrayPool<byte>.Shared.Rent(buffer.Length); 593byte[]? tempOutputBuffer = ArrayPool<byte>.Shared.Rent(checked(numWholeBlocks * _outputBlockSize)); 660byte[]? rentedBuffer = ArrayPool<byte>.Shared.Rent(inputBuffer.Length); 690byte[]? rentedBuffer = ArrayPool<byte>.Shared.Rent(bufferSize); 722byte[]? rentedBuffer = ArrayPool<byte>.Shared.Rent(bufferSize);
System\Security\Cryptography\DSA.cs (1)
898byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
System\Security\Cryptography\ECDsa.cs (4)
150rented = ArrayPool<byte>.Shared.Rent(maxSignatureSize); 432rented = ArrayPool<byte>.Shared.Rent(maxSignatureSize); 1009byte[] array = ArrayPool<byte>.Shared.Rent(data.Length); 1218byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
System\Security\Cryptography\HashAlgorithm.cs (3)
97byte[] buffer = ArrayPool<byte>.Shared.Rent(4096); 133byte[] rented = ArrayPool<byte>.Shared.Rent(4096); 254byte[] array = ArrayPool<byte>.Shared.Rent(source.Length);
System\Security\Cryptography\RandomNumberGenerator.cs (2)
59byte[] array = ArrayPool<byte>.Shared.Rent(data.Length); 82byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
System\Security\Cryptography\RSA.cs (2)
318byte[] array = ArrayPool<byte>.Shared.Rent(data.Length); 1449byte[] rented = ArrayPool<byte>.Shared.Rent(resultSize);
System\Security\Cryptography\SymmetricAlgorithm.cs (1)
723byte[] decryptRent = ArrayPool<byte>.Shared.Rent(ciphertext.Length);
System\Security\Cryptography\X509Certificates\CertificateRequest.Load.cs (1)
50byte[] rented = ArrayPool<byte>.Shared.Rent(fields.DecodedDataLength);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Load.cs (1)
272byte[] rented = ArrayPool<byte>.Shared.Rent(fields.DecodedDataLength);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (2)
1384_errors = ArrayPool<ErrorCollection>.Shared.Rent(size); 1392_errors = ArrayPool<ErrorCollection>.Shared.Rent(errorDepth + 1);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (3)
95CertBagAsn[] certBags = ArrayPool<CertBagAsn>.Shared.Rent(certCount); 96SafeBagAsn[] keyBags = ArrayPool<SafeBagAsn>.Shared.Rent(certCount); 97AttributeAsn[] certAttrs = ArrayPool<AttributeAsn>.Shared.Rent(certCount);
System\Security\Cryptography\X509Certificates\UnixPkcs12Reader.cs (8)
299CertBagAsn[] certBags = ArrayPool<CertBagAsn>.Shared.Rent(10); 300AttributeAsn[]?[] certBagAttrs = ArrayPool<AttributeAsn[]?>.Shared.Rent(10); 301SafeBagAsn[] keyBags = ArrayPool<SafeBagAsn>.Shared.Rent(10); 318certs = ArrayPool<CertAndKey>.Shared.Rent(certBagIdx); 321keys = ArrayPool<AsymmetricAlgorithm>.Shared.Rent(keyBagIdx); 324publicKeyInfos = ArrayPool<RentedSubjectPublicKeyInfo>.Shared.Rent(keyBagIdx); 388ContentInfoAsn[] rented = ArrayPool<ContentInfoAsn>.Shared.Rent(10); 813T[] newRent = ArrayPool<T>.Shared.Rent(oldRent.Length * 2);
System.Security.Cryptography.Cose (8)
System\Security\Cryptography\Cose\CoseMessage.cs (2)
437byte[] contentBuffer = ArrayPool<byte>.Shared.Rent(4096); 473byte[] contentBuffer = ArrayPool<byte>.Shared.Rent(4096);
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
793byte[] buffer = ArrayPool<byte>.Shared.Rent(Math.Max(toBeSignedLength, CoseHelpers.ComputeSignatureSize(signer))); 869byte[] buffer = ArrayPool<byte>.Shared.Rent(Math.Max(toBeSignedLength, CoseHelpers.ComputeSignatureSize(signer)));
System\Security\Cryptography\Cose\CoseSign1Message.cs (2)
629byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferLength); 730byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferLength);
System\Security\Cryptography\Cose\CoseSignature.cs (2)
405byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferLength); 437byte[] buffer = ArrayPool<byte>.Shared.Rent(bufferLength);
System.Text.Encodings.Web (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
System\Text\Encodings\Web\TextEncoder.cs (1)
521char[] rentedArray = ArrayPool<char>.Shared.Rent(Math.Max(value.Length, minBufferBumpEachIteration));
System.Text.Json (94)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (3)
40_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 124_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 206_rentedBuffer = ArrayPool<byte>.Shared.Rent(newSize);
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
43: (rentedBuffer = ArrayPool<char>.Shared.Rent(initialBufferLength)); 160char[] newBuffer = ArrayPool<char>.Shared.Rent(newSize);
System\Text\Json\Document\JsonDocument.cs (2)
295(otherUtf8TextArray = ArrayPool<byte>.Shared.Rent(length)); 862byte[] rent = ArrayPool<byte>.Shared.Rent(length);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (3)
138byte[] data = ArrayPool<byte>.Shared.Rent(initialSize); 197byte[] newRent = ArrayPool<byte>.Shared.Rent(Length); 257_data = ArrayPool<byte>.Shared.Rent(newCapacity);
System\Text\Json\Document\JsonDocument.Parse.cs (10)
87byte[] utf8Bytes = ArrayPool<byte>.Shared.Rent(length); 270byte[] utf8Bytes = ArrayPool<byte>.Shared.Rent(expectedByteCount); 296byte[] utf8Bytes = ArrayPool<byte>.Shared.Rent(expectedByteCount); 627byte[] rented = ArrayPool<byte>.Shared.Rent(length); 775rented = ArrayPool<byte>.Shared.Rent(checked((int)expectedLength)); 779rented = ArrayPool<byte>.Shared.Rent(UnseekableStreamInitialRentSize); 810rented = ArrayPool<byte>.Shared.Rent(checked(toReturn.Length * 2)); 858rented = ArrayPool<byte>.Shared.Rent(checked((int)expectedLength)); 862rented = ArrayPool<byte>.Shared.Rent(UnseekableStreamInitialRentSize); 898rented = ArrayPool<byte>.Shared.Rent(toReturn.Length * 2);
System\Text\Json\Document\JsonDocument.StackRowStack.cs (2)
23_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialSize); 66_rentedBuffer = ArrayPool<byte>.Shared.Rent(toReturn.Length * 2);
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (2)
77byte[] tmpUtf8 = ArrayPool<byte>.Shared.Rent(maxBytes); 189(rented = ArrayPool<byte>.Shared.Rent(remaining));
System\Text\Json\JsonEncodedText.cs (1)
88(array = ArrayPool<byte>.Shared.Rent(expectedByteCount));
System\Text\Json\JsonHelpers.Escaping.cs (2)
42(valueArray = ArrayPool<byte>.Shared.Rent(length)); 70(valueArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (7)
20(unescapedArray = ArrayPool<byte>.Shared.Rent(utf8Source.Length)); 50(pooledName = ArrayPool<byte>.Shared.Rent(length)); 77(pooledName = ArrayPool<byte>.Shared.Rent(length)); 102(unescapedArray = ArrayPool<byte>.Shared.Rent(utf8Source.Length)); 133(unescapedArray = ArrayPool<byte>.Shared.Rent(length)); 137(escapedArray = ArrayPool<byte>.Shared.Rent(length)); 180(pooledArray = ArrayPool<byte>.Shared.Rent(utf8Unescaped.Length));
System\Text\Json\Reader\Utf8JsonReader.cs (1)
543otherUtf8TextArray = ArrayPool<byte>.Shared.Rent(length);
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (3)
158(rentedBuffer = ArrayPool<byte>.Shared.Rent(valueLength)); 173(rentedBuffer = ArrayPool<byte>.Shared.Rent(valueLength)); 210(rentedBuffer = ArrayPool<byte>.Shared.Rent(sequenceLength));
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (4)
353ArrayPool<FoundProperty>.Shared.Rent(Math.Max(1, state.Current.JsonTypeInfo.PropertyCache!.Count)); 360var newCache = ArrayPool<FoundProperty>.Shared.Rent(argumentState.FoundProperties.Length * 2); 561argumentState.FoundPropertiesAsync = ArrayPool<FoundPropertyAsync>.Shared.Rent(Math.Max(1, state.Current.JsonTypeInfo.PropertyCache!.Count)); 567var newCache = ArrayPool<FoundPropertyAsync>.Shared.Rent(argumentState.FoundPropertiesAsync!.Length * 2);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (1)
57object?[] arguments = ArrayPool<object>.Shared.Rent(cache.Count);
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (1)
378: (rentedBuffer = ArrayPool<char>.Shared.Rent(bufferLength));
System\Text\Json\Serialization\Converters\Value\HalfConverter.cs (1)
43: (rentedByteBuffer = ArrayPool<byte>.Shared.Rent(bufferLength));
System\Text\Json\Serialization\Converters\Value\Int128Converter.cs (1)
42: (rentedBuffer = ArrayPool<byte>.Shared.Rent(bufferLength));
System\Text\Json\Serialization\Converters\Value\UInt128Converter.cs (1)
42: (rentedBuffer = ArrayPool<byte>.Shared.Rent(bufferLength));
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (2)
436json.Length <= (JsonConstants.ArrayPoolMaxSizeBeforeUsingNormalAlloc / JsonConstants.MaxExpansionFactorWhileTranscoding) ? tempArray = ArrayPool<byte>.Shared.Rent(json.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) : 467json.Length <= (JsonConstants.ArrayPoolMaxSizeBeforeUsingNormalAlloc / JsonConstants.MaxExpansionFactorWhileTranscoding) ? tempArray = ArrayPool<byte>.Shared.Rent(json.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) :
System\Text\Json\Serialization\ReadBufferState.cs (2)
25_buffer = ArrayPool<byte>.Shared.Rent(Math.Max(initialBufferSize, JsonConstants.Utf8Bom.Length)); 120byte[] newBuffer = ArrayPool<byte>.Shared.Rent((_buffer.Length < (int.MaxValue / 2)) ? _buffer.Length * 2 : int.MaxValue);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
719(propertyArray = ArrayPool<byte>.Shared.Rent(length)); 874(propertyArray = ArrayPool<char>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (2)
148(propertyArray = ArrayPool<char>.Shared.Rent(length)); 171(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (2)
155(propertyArray = ArrayPool<char>.Shared.Rent(length)); 178(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (2)
154(propertyArray = ArrayPool<char>.Shared.Rent(length)); 177(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (2)
154(propertyArray = ArrayPool<char>.Shared.Rent(length)); 177(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (2)
158(propertyArray = ArrayPool<char>.Shared.Rent(length)); 181(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (2)
158(propertyArray = ArrayPool<char>.Shared.Rent(length)); 181(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (2)
125(propertyArray = ArrayPool<char>.Shared.Rent(length)); 148(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (2)
154(propertyArray = ArrayPool<char>.Shared.Rent(length)); 177(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (2)
276(propertyArray = ArrayPool<char>.Shared.Rent(length)); 299(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (2)
230(propertyArray = ArrayPool<char>.Shared.Rent(length)); 253(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
126propertyArray = ArrayPool<char>.Shared.Rent(length); 285propertyArray = ArrayPool<byte>.Shared.Rent(length); 920(valueArray = ArrayPool<byte>.Shared.Rent(length)); 943(valueArray = ArrayPool<char>.Shared.Rent(length)); 966(propertyArray = ArrayPool<char>.Shared.Rent(length)); 989(propertyArray = ArrayPool<byte>.Shared.Rent(length)); 1092valueArray = ArrayPool<char>.Shared.Rent(length); 1112propertyArray = ArrayPool<char>.Shared.Rent(length); 1152valueArray = ArrayPool<byte>.Shared.Rent(length); 1172propertyArray = ArrayPool<byte>.Shared.Rent(length); 1212valueArray = ArrayPool<byte>.Shared.Rent(length); 1232propertyArray = ArrayPool<char>.Shared.Rent(length); 1272valueArray = ArrayPool<char>.Shared.Rent(length); 1292propertyArray = ArrayPool<byte>.Shared.Rent(length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (2)
239(propertyArray = ArrayPool<char>.Shared.Rent(length)); 262(propertyArray = ArrayPool<byte>.Shared.Rent(length));
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (1)
210json.Length <= (JsonConstants.ArrayPoolMaxSizeBeforeUsingNormalAlloc / JsonConstants.MaxExpansionFactorWhileTranscoding) ? tempArray = ArrayPool<byte>.Shared.Rent(json.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) :
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (2)
194(valueArray = ArrayPool<char>.Shared.Rent(length)); 341(valueArray = ArrayPool<byte>.Shared.Rent(length));
System.Text.Json.SourceGeneration (2)
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
43: (rentedBuffer = ArrayPool<char>.Shared.Rent(initialBufferLength)); 160char[] newBuffer = ArrayPool<char>.Shared.Rent(newSize);
System.Text.RegularExpressions (4)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);
System\Text\StructListBuilder.cs (1)
66T[] newArray = _array = ArrayPool<T>.Shared.Rent(newSize);
System.Text.RegularExpressions.Generator (3)
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (2)
28_arrayToReturnToPool = ArrayPool<char>.Shared.Rent(initialCapacity); 310char[] poolArray = ArrayPool<char>.Shared.Rent(newCapacity);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ValueListBuilder.cs (1)
193T[] array = ArrayPool<T>.Shared.Rent(nextCapacity);