Fix MemoryManager ctor and use internal span ctor to improve performance (#17452)
authorAhson Khan <ahkha@microsoft.com>
Mon, 9 Apr 2018 22:49:04 +0000 (15:49 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Apr 2018 22:49:04 +0000 (15:49 -0700)
commit09ea3a952e4c9df4b572f9c76e8e58f052f6f18f
tree3cf12dd9c879f1e035e2e3297bbdf7f1b020b8c6
parenta788a72d5ac56ceb8285d14c87f9ccddc229be34
Fix MemoryManager ctor and use internal span ctor to improve performance (#17452)

* Fix MemoryManager ctor, add unit and perf tests, and use internal span ctor.

* Address PR feedback (remove use of Unsafe.As and Dangerous Span Ctor)
src/mscorlib/shared/System/Memory.cs
src/mscorlib/shared/System/ReadOnlyMemory.cs
src/mscorlib/src/System/ThrowHelper.cs