Skip to content

Implement pinned flavors of GC.Allocate[Uninitialized]Array on Mono #33583

@VSadov

Description

@VSadov

System.GC is exposing new APIs. (see: #33526)

public static T[] AllocateArray<T>(int length, bool pinned = false);
public static T[] AllocateUninitializedArray<T>(int length, bool pinned = false);

The "pinned" part guarantees that the allocated object will never be relocated.
The easiest way to implement these is to allocate in a part of the heap that is never compacted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions