Class BaseMemory
Contains static methods to work with native memory buffers.
public static class BaseMemory
- Inheritance
-
BaseMemory
Properties
- Handler
Gets or sets handler.
Methods
- Alloc(int)
Allocates size bytes of uninitialized storage.
- Copy(IntPtr, IntPtr, int)
Copies
count
bytes from the object pointed to bysrc
to the object pointed to bydest
. Both objects are reinterpreted as arrays of byte.
- CopyLong(IntPtr, IntPtr, ulong)
Copies
count
bytes from the object pointed to bysrc
to the object pointed to bydest
. Both objects are reinterpreted as arrays of byte.
- Fill(IntPtr, byte, int)
Copies the
fillByte
into each of the first count bytes of the object pointed to bydest
.
- FillLong(IntPtr, byte, ulong)
Copies the
fillByte
into each of the first count bytes of the object pointed to bydest
.
- FreeMem(IntPtr)
Deallocates the space previously allocated by Alloc(int) or Realloc(IntPtr, int).
- Move(IntPtr, IntPtr, int)
Copies
count
bytes from the object pointed to bysrc
to the object pointed to bydest
. Both objects are reinterpreted as arrays of byte.
- MoveLong(IntPtr, IntPtr, ulong)
Copies
count
bytes from the object pointed to bysrc
to the object pointed to bydest
. Both objects are reinterpreted as arrays of byte.
- Realloc(IntPtr, int)
Reallocates the given area of memory (implicitly creating objects in the destination area). It must be previously allocated by Alloc(int) and not yet freed with FreeMem(IntPtr), otherwise, the results are undefined.
- ReallocLong(IntPtr, ulong)
Reallocates the given area of memory (implicitly creating objects in the destination area). It must be previously allocated by Alloc(int) and not yet freed with FreeMem(IntPtr), otherwise, the results are undefined.