Reduce memory allocations on read performance counters. (dotnet/corefx#32393)
authorMaxim Shoshin <max.shoshin@gmail.com>
Sat, 19 Jan 2019 16:39:57 +0000 (19:39 +0300)
committerDan Moseley <danmose@microsoft.com>
Sat, 19 Jan 2019 16:39:57 +0000 (08:39 -0800)
commit3a02c1ec7aa164155d9375437e3f69500e4926f5
treebeaca449babe313222e043efcf2e3fee34cfef32
parentb8188f5e594def08c01a1880f045cc96f1fe54cc
Reduce memory allocations on read performance counters. (dotnet/corefx#32393)

* Reduce memory allocations on read performance counters

* Fix review issues

* Add license header

* Remove unnecessary code: for ArrayPool diagnostic and check in Dispose

* Remove unnecessary usage of MemoryMarshal

Commit migrated from https://github.com/dotnet/corefx/commit/c4f331961bfc6317a16a6ec43b53c780bd3c8dc4
src/libraries/Common/src/Interop/Windows/advapi32/Interop.RegConnectRegistry.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/Resources/Strings.resx
src/libraries/System.Diagnostics.PerformanceCounter/src/System.Diagnostics.PerformanceCounter.csproj
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceDataRegistryKey.cs [new file with mode: 0644]