NativeMemory 类

定义

此类包含主要用于管理本机内存的方法。

public ref class NativeMemory abstract sealed
public static class NativeMemory
type NativeMemory = class
Public Class NativeMemory
继承
NativeMemory

方法

AlignedAlloc(UIntPtr, UIntPtr)

分配指定大小和对齐方式的对齐内存块(以字节为单位)。

AlignedFree(Void*)

释放对齐的内存块。

AlignedRealloc(Void*, UIntPtr, UIntPtr)

重新分配指定大小和对齐方式的对齐内存块(以字节为单位)。

Alloc(UIntPtr)

分配指定大小的内存块(以字节为单位)。

Alloc(UIntPtr, UIntPtr)

以 元素为单位分配指定大小的内存块。

AllocZeroed(UIntPtr)

分配指定大小(以字节为单位)的内存块并将其归零。

AllocZeroed(UIntPtr, UIntPtr)

在 元素中分配和归零指定大小的内存块。

Clear(Void*, UIntPtr)

清除内存块。

Copy(Void*, Void*, UIntPtr)

将内存块从内存位置 source 复制到内存位置 destination

Fill(Void*, UIntPtr, Byte)

将字节value复制到位于 ptr处的内存的第一个byteCount字节。

Free(Void*)

释放内存块。

Realloc(Void*, UIntPtr)

将内存块重新分配为指定大小(以字节为单位)。

适用于