24 lines
766 B
C#
24 lines
766 B
C#
namespace UnmanagedMMU.Allocators
|
|
{
|
|
/// <summary>
|
|
/// Interface that defines an Unmanaged allocator
|
|
/// </summary>
|
|
internal unsafe interface IUnmanagedAllocator
|
|
{
|
|
/// <summary>
|
|
/// Allocates an unmanaged memory block of the specified size.
|
|
/// </summary>
|
|
/// <param name="size">The number of bytes to allocate.</param>
|
|
/// <returns>
|
|
/// A pointer to the beginning of the allocated memory block,.
|
|
/// </returns>
|
|
void* Alloc(nuint size);
|
|
|
|
/// <summary>
|
|
/// Frees a previously allocated unmanaged memory block.
|
|
/// </summary>
|
|
/// <param name="ptr">A pointer to the beginning of the memory block to free.</param>
|
|
void Free(void* ptr);
|
|
}
|
|
}
|