NativeMemory 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
這個類別包含主要用來管理原生記憶體的方法。
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) |
將記憶體區塊從記憶體位置 |
| Fill(Void*, UIntPtr, Byte) |
將位元組 |
| Free(Void*) |
釋放一個記憶體區塊。 |
| Realloc(Void*, UIntPtr) |
將記憶體區塊重新分配到指定大小(以位元組為單位)。 |