28 lines
779 B
C#
28 lines
779 B
C#
using UnmanagedMMU.Allocators;
|
|
|
|
namespace UnmanagedMMU.Handles
|
|
{
|
|
|
|
/// <summary>
|
|
/// Interface that represents an untyped handle to unmanaged memory.
|
|
/// </summary>
|
|
public unsafe interface IMemoryHandle
|
|
{
|
|
|
|
/// <summary>
|
|
/// Gets the raw pointer to the underlying unmanaged memory block.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// The returned pointer is valid only for the lifetime of the allocator
|
|
/// that created this <see cref="IMemoryHandle"/>.
|
|
/// </remarks>
|
|
void* Pointer { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the number of bytes in the unmanaged memory block
|
|
/// represented by this <see cref="IMemoryHandle"/>.
|
|
/// </summary>
|
|
nuint ByteCount { get; }
|
|
}
|
|
}
|