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)

將記憶體區塊重新配置為指定的大小,以位元組為單位。

適用於