Interface IResizableAllocator
- Namespace
- SharpPluginLoader.Core.Memory
- Assembly
- SharpPluginLoader.Core.dll
Describes an allocator that can also reallocate memory blocks.
public interface IResizableAllocator : IAllocator
- Inherited Members
Methods
Reallocate(void*, nint)
Reallocates a previously allocated memory block to the specified size.
void* Reallocate(void* ptr, nint size)
Parameters
ptrvoid*The pointer to the memory block to reallocate.
sizenintThe new size of the memory block.
Returns
- void*
A pointer to the reallocated memory block.
Reallocate<TObj>(TObj*, int)
Reallocates a previously allocated object array to the specified number of instances.
TObj* Reallocate<TObj>(TObj* ptr, int count) where TObj : unmanaged
Parameters
ptrTObj*The pointer to the memory block to reallocate.
countintThe new number of instances to allocate.
Returns
- TObj*
A pointer to the reallocated memory block.
Type Parameters
TObjThe type of object to reallocate.