Interface IMemoryHandler
Contains methods which allow to perform operations with memory buffers.
public interface IMemoryHandler : IDisposable
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
.
- Free(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.