Using AllocateUninitializedArray in array pool (dotnet/coreclr#24504)
authorVladimir Sadov <vsadov@microsoft.com>
Tue, 28 May 2019 21:28:56 +0000 (14:28 -0700)
committerGitHub <noreply@github.com>
Tue, 28 May 2019 21:28:56 +0000 (14:28 -0700)
commit23799940b498980aea55fe5f8e89e0e44be30c42
treec5caea990c4f01c288fa555cd0b85449c32b35fe
parent72eab5372348bf7062b69efa8cefe8fb6f34cfcc
Using AllocateUninitializedArray in array pool (dotnet/coreclr#24504)

* Just use `new T[]` when elements are not pointer-free

* reduce zeroing out when not necessary.

* use AllocateUninitializedArray in ArrayPool

Commit migrated from https://github.com/dotnet/coreclr/commit/4ca032d49b0718eb40f2105f94db2b243cf94957
src/coreclr/src/System.Private.CoreLib/src/System/GC.cs
src/coreclr/src/gc/gc.cpp
src/libraries/System.Private.CoreLib/src/System/Buffers/ConfigurableArrayPool.cs
src/libraries/System.Private.CoreLib/src/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs