2 types derived from ArrayPool
System.Private.CoreLib (2)
1949 references to ArrayPool
aspire (4)
Aspire.Dashboard (6)
Aspire.Hosting (2)
dotnet (8)
GenerateDocumentationAndConfigFiles (6)
ILCompiler.Compiler (8)
ILCompiler.TypeSystem (4)
illink (4)
ILLink.RoslynAnalyzer (4)
Microsoft.AspNetCore.Antiforgery (10)
Microsoft.AspNetCore.Components (16)
Microsoft.AspNetCore.Components.Endpoints (26)
Microsoft.AspNetCore.Components.Forms (2)
Microsoft.AspNetCore.Components.Server (30)
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Components.WebAssembly (5)
Microsoft.AspNetCore.Components.WebView (5)
Microsoft.AspNetCore.DataProtection (27)
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (9)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.Http (4)
Microsoft.AspNetCore.Http.Abstractions (3)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Extensions (20)
Microsoft.AspNetCore.Http.Results (2)
Microsoft.AspNetCore.HttpLogging (13)
Microsoft.AspNetCore.Identity (5)
Microsoft.AspNetCore.Mvc.Core (15)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (16)
Microsoft.AspNetCore.Mvc.ViewFeatures (15)
Microsoft.AspNetCore.OpenApi (3)
Microsoft.AspNetCore.OutputCaching (8)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
Microsoft.AspNetCore.Owin (2)
Microsoft.AspNetCore.Razor.Utilities.Shared (37)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\BufferExtensions.cs (18)
11/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
14/// The <see cref="ArrayPool{T}"/> to use.
23public static PooledArray<T> GetPooledArray<T>(this ArrayPool<T> pool, int minimumLength)
27/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
30/// The <see cref="ArrayPool{T}"/> to use.
42public static PooledArray<T> GetPooledArray<T>(this ArrayPool<T> pool, int minimumLength, bool clearOnReturn)
46/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
49/// The <see cref="ArrayPool{T}"/> to use.
61public static PooledArray<T> GetPooledArray<T>(this ArrayPool<T> pool, int minimumLength, out T[] array)
65/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
68/// The <see cref="ArrayPool{T}"/> to use.
83public static PooledArray<T> GetPooledArray<T>(this ArrayPool<T> pool, int minimumLength, bool clearOnReturn, out T[] array)
91/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
96/// The <see cref="ArrayPool{T}"/> to use.
104public static PooledArray<T> GetPooledArraySpan<T>(this ArrayPool<T> pool, int minimumLength, out Span<T> span)
108/// Rents an array of the given minimum length from the specified <see cref="ArrayPool{T}"/>.
113/// The <see cref="ArrayPool{T}"/> to use.
124public static PooledArray<T> GetPooledArraySpan<T>(this ArrayPool<T> pool, int minimumLength, bool clearOnReturn, out Span<T> span)
Microsoft.AspNetCore.Server.Kestrel.Core (26)
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (5)
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (6)
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Microsoft.AspNetCore.WebSockets (7)
Microsoft.AspNetCore.WebUtilities (45)
Microsoft.Build (7)
Microsoft.Build.Framework (16)
Microsoft.Build.Tasks.Core (4)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.CSharp (4)
Microsoft.CodeAnalysis.Razor.Compiler (15)
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
Microsoft.CodeAnalysis.Workspaces (10)
Microsoft.DotNet.Build.Tasks.FileCatalog (2)
Microsoft.DotNet.Cli.Utils (9)
Microsoft.DotNet.HotReload.Watch (18)
Microsoft.DotNet.TemplateLocator (4)
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions (8)
Microsoft.Extensions.Caching.Hybrid (23)
Microsoft.Extensions.Caching.Hybrid.Tests (12)
Microsoft.Extensions.Caching.SqlServer (4)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
Microsoft.Extensions.Compliance.Abstractions (3)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (3)
Microsoft.Extensions.Configuration.EnvironmentVariables (4)
Microsoft.Extensions.DataIngestion (4)
Microsoft.Extensions.DependencyModel (6)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Microsoft.Extensions.DotNetDeltaApplier (18)
Microsoft.Extensions.Http.Diagnostics (4)
Microsoft.Extensions.Logging.Abstractions (4)
Microsoft.Extensions.Logging.Console (10)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.ServiceDiscovery.Dns (13)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (8)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (4)
Microsoft.Extensions.Telemetry (8)
Microsoft.JSInterop (5)
Microsoft.ML.Core (2)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.Tokenizers (194)
Model\SentencePieceUnigramModel.cs (40)
387int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
390char[] normalizedString = ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
401ArrayPool<char>.Shared.Return(normalizedString);
402ArrayPool<int>.Shared.Return(buffer);
424char[] utf16NormalizedString = ArrayPool<char>.Shared.Rent(normalizedString.Length << 1);
426ArrayPool<char>.Shared.Return(normalizedString);
441char[] utf16NormalizedString = ArrayPool<char>.Shared.Rent(normalizedString.Length << 1);
443ArrayPool<char>.Shared.Return(normalizedString);
588ArrayPool<byte>.Shared.Return(normalizedArrayPool);
620BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
680ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
683ArrayPool<byte>.Shared.Return(normalizedArrayPool);
862int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
865char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
891ArrayPool<char>.Shared.Return(normalizedString);
894ArrayPool<int>.Shared.Return(buffer);
913ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1071BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1094unknownTokensTracking = ArrayPool<(int IdsIndex, int Utf8Index, int Utf8Length)>.Shared.Rent(10);
1107ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1143ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1217ArrayPool<(int IdsIndex, int Utf8Index, int Utf8Length)>.Shared.Return(unknownTokensTracking);
1222ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1262int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
1265char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
1291ArrayPool<char>.Shared.Return(normalizedString);
1294ArrayPool<int>.Shared.Return(buffer);
1412BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1418(int Id, int UtfStartOffset, int Utf8Length)[] ids = ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Rent(bestPathEndsAt.Length);
1438ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1451ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Return(ids);
1455ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1493ArrayPool<(int Id, int UtfStartOffset, int Utf8Length)>.Shared.Return(ids);
1502ArrayPool<byte>.Shared.Return(normalizedArrayPool);
1539int[] buffer = ArrayPool<int>.Shared.Rent(textToEncode.Length * 3);
1542char[]? normalizedString = maxTokenCount == int.MaxValue ? null : ArrayPool<char>.Shared.Rent(textToEncode.Length + 2);
1568ArrayPool<int>.Shared.Return(buffer);
1673BestPathNode[] bestPathEndsAt = ArrayPool<BestPathNode>.Shared.Rent(normalizationSpan.Length + 1);
1726ArrayPool<BestPathNode>.Shared.Return(bestPathEndsAt);
1729ArrayPool<byte>.Shared.Return(normalizedArrayPool);
Microsoft.ML.Tokenizers.Tests (11)
Microsoft.NET.Build.Tasks (4)
Microsoft.Net.Http.Headers (4)
Microsoft.NET.Sdk.WorkloadManifestReader (4)
Microsoft.Private.Windows.Core (18)
Microsoft.Win32.Registry (10)
mscorlib (1)
netstandard (1)
NuGet.Common (2)
NuGet.Packaging (6)
NuGet.ProjectModel (11)
PresentationCore (3)
PresentationFramework (2)
Roslyn.Diagnostics.Analyzers (6)
Shared (15)
System.Buffers (1)
System.Collections.Immutable (22)
System.Console (6)
System.Diagnostics.DiagnosticSource (4)
System.Diagnostics.PerformanceCounter (2)
System.Diagnostics.Process (39)
System.Drawing.Common (2)
System.Formats.Asn1 (2)
System.Formats.Cbor (2)
System.Formats.Nrbf (2)
System.Formats.Tar (35)
System.IO.Compression (38)
System.IO.Compression.Brotli (2)
System.IO.Compression.ZipFile (2)
System.IO.FileSystem.AccessControl (4)
System.IO.FileSystem.Watcher (4)
System.IO.Packaging (2)
System.IO.Pipelines (5)
System.Linq (4)
System.Memory (6)
System.Net.Http (37)
System.Net.Http.WinHttpHandler (6)
System.Net.Mail (4)
System.Net.NameResolution (21)
System.Net.Primitives (2)
System.Net.Quic (15)
System.Net.Security (39)
System.Net.ServerSentEvents (12)
System.Net.WebSockets (20)
System.Numerics.Tensors (23)
System.Private.CoreLib (173)
System.Private.CoreLib.Generators (3)
System.Private.Uri (7)
System.Private.Windows.Core (12)
System.Private.Xml (4)
System.Reflection.Metadata (6)
System.Runtime (1)
System.Runtime.Numerics (34)
System.Security.Cryptography (58)
System.Security.Cryptography.Cose (16)
System.Security.Cryptography.Pkcs (2)
System.ServiceModel.NetFramingBase (12)
System.ServiceProcess.ServiceController (4)
System.Text.Encodings.Web (6)
System.Text.Json (213)
System.Text.Json.SourceGeneration (7)
System.Text.RegularExpressions (13)
System.Text.RegularExpressions.Generator (7)
System.Web.HttpUtility (8)