src/AnvilPacker/Util/Mem.cs
/// <summary> Allocates a unmanaged memory block of <paramref name="count"/> <typeparamref name="T"/> elements from the heap. </summary>
/// <remarks>The returned pointer should be released with <see cref="Free{T}(T*)"/> when it is no longer needed.</remarks>
Allocates a unmanaged memory block of   elements from the heap.
Allocates a unmanaged memory block of elements from the heap .
public static T* Alloc<T>(nint count) where T : unmanaged
        {
            nuint numBytes = checked((nuint)(count * sizeof(T)));
            return (T*)NativeMemory.Alloc(numBytes);
        }
public static T * Alloc < T > ( nint count ) where T : unmanaged { nuint numBytes = checked ( ( nuint ) ( count * sizeof ( T ) ) ) ; return ( T * ) NativeMemory . Alloc ( numBytes ) ; }
Allocates a unmanaged memory block of   elements from the heap.
Allocates a unmanaged memory block of elements from the heap .
count
nint
remarks
The returned pointer should be released with  when it is no longer needed.
The returned pointer should be released with when it is no longer needed .