System.GC.AllocateUninitializedArray (#24096)
authorVladimir Sadov <vsadov@microsoft.com>
Fri, 3 May 2019 05:16:31 +0000 (22:16 -0700)
committerJan Kotas <jkotas@microsoft.com>
Fri, 3 May 2019 05:16:31 +0000 (22:16 -0700)
commitb271aff1fa54c1385143f3b45c1bf3af01c901cd
tree69c76676a56a28979fd1c5c66db9d096afa98c6e
parentdd814e26e2206c36589f88b2c58a6f3695f7dc4e
System.GC.AllocateUninitializedArray (#24096)

* Do not expand to allocation_quantum in SOH when GC_ALLOC_ZEROING_OPTIONAL

* short-circuit short arrays to use `new T[size]`

* Clean syncblock of large-aligned objects on ARM32

* specialize single-dimensional path  AllocateSzArray

* Unit tests

* Some PR feedback. Made AllocateUninitializedArray not be trimmed away.

* PR feedback on gchelpers
- replaced use of multiple bool parameters with flags enum
- merged some methods with nearly identical implementation
- switched callers to use AllocateSzArray vs. AllocateArrayEx where appropriate.

* PR feedback. Removed X86 specific array/string allocation helpers.
24 files changed:
src/System.Private.CoreLib/ILLinkTrim.xml
src/System.Private.CoreLib/src/System/GC.cs
src/gc/gc.cpp
src/gc/gcinterface.h
src/gc/gcpriv.h
src/vm/comutilnative.cpp
src/vm/comutilnative.h
src/vm/crossloaderallocatorhash.inl
src/vm/customattribute.cpp
src/vm/ecalllist.h
src/vm/fieldmarshaler.cpp
src/vm/gchelpers.cpp
src/vm/gchelpers.h
src/vm/i386/jitinterfacex86.cpp
src/vm/ilmarshalers.cpp
src/vm/interpreter.cpp
src/vm/jithelpers.cpp
src/vm/object.h
src/vm/qcall.cpp
src/vm/runtimehandles.cpp
src/vm/typeparse.cpp
tests/src/GC/API/GC/AllocateUninitializedArray.cs [new file with mode: 0644]
tests/src/GC/API/GC/AllocateUninitializedArray.csproj [new file with mode: 0644]
tests/src/JIT/Methodical/doublearray/dblarray3.cs