Class MemoryUtil
Allocates memory from native heap of this process using heap API. Also has more functions to work with memory: copy, move, virtual alloc.
public static class MemoryUtil
Remarks
Uses the common heap of this process, API GetProcessHeap.
Namespace: Au.More
Assembly: Au.dll
Methods
| Name | Description |
|---|---|
| Alloc(nint, bool) | Allocates new memory block and returns its address. |
| Alloc<T>(nint, bool) | Allocates new memory block and returns its address. |
| Copy(void*, void*, nint) | Copies memory with System.Buffer.MemoryCopy. |
| Free(void*) | Frees a memory block.
Does nothing if mem is |
| FreeAlloc<T>(ref T*, nint, bool) | Frees a memory block (if not |
| Move(void*, void*, nint) | Copies memory with API memmove. |
| ReAlloc<T>(ref T*, nint, bool) | Reallocates a memory block to make it bigger or smaller. |
| VirtualAlloc(nint) | Allocates new virtual memory block with API VirtualAlloc and returns its address: |
| VirtualFree(void*) | Frees a memory block allocated with MemoryUtil.VirtualAlloc.
Does nothing if mem is |