brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs
2026-10-15 14:12:02 +13:00

58 lines
2.4 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L135">Jolt/Core/TempAllocator.h:135</see>
/// <br/>
/// <c>class TempAllocatorMalloc final : public TempAllocator</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Implementation of the TempAllocator that just falls back to malloc/free
/// Note: This can be quite slow when running in the debugger as large memory blocks need to be initialized with 0xcd
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct TempAllocatorMalloc : IDisposable
{
public static TempAllocatorMalloc Create() => Jolt.PInvoke.TempAllocatorMalloc_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L141">Jolt/Core/TempAllocator.h:141</see>
/// <br/>
/// <c>virtual void * Allocate(uint inSize) override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: TempAllocator
/// </para>
/// </remarks>
public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorMalloc_Allocate(this, size);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L155">Jolt/Core/TempAllocator.h:155</see>
/// <br/>
/// <c>virtual void Free(void *inAddress, uint inSize) override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: TempAllocator
/// </para>
/// </remarks>
public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorMalloc_Free(this, address, size);
public static implicit operator TempAllocator(TempAllocatorMalloc value) => Jolt.PInvoke.TempAllocatorMalloc_AsTempAllocator(value);
public void Dispose() => Jolt.PInvoke.TempAllocatorMalloc_Destroy(this);
}
}