NativeMemory 類別

定義

這個類別包含主要用來管理原生記憶體的方法。

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

方法

名稱 Description
AlignedAlloc(UIntPtr, UIntPtr)

分配一個符合指定大小與對齊方式的記憶體區塊,以位元組為單位。

AlignedFree(Void*)

釋放一個已對齊的記憶體區塊。

AlignedRealloc(Void*, UIntPtr, UIntPtr)

重新配置指定大小與對齊方式的記憶體區塊(位元組)。

Alloc(UIntPtr, UIntPtr)

以元素分配指定大小的記憶體區塊。

Alloc(UIntPtr)

分配指定大小的記憶體區塊,以位元組為單位。

AllocZeroed(UIntPtr, UIntPtr)

分配並歸零指定大小的記憶體區塊,以元素為單位。

AllocZeroed(UIntPtr)

分配並歸零指定大小的記憶體區塊,以位元組為單位。

Clear(Void*, UIntPtr)

清除一塊記憶體。

Copy(Void*, Void*, UIntPtr)

將記憶體區塊從記憶體位置 source 複製到記憶體位置 destination

Fill(Void*, UIntPtr, Byte)

將位元組value複製到位於 ptr的記憶體前幾個byteCount位元組。

Free(Void*)

釋放一個記憶體區塊。

Realloc(Void*, UIntPtr)

將記憶體區塊重新分配到指定大小(以位元組為單位)。

適用於