mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
71 lines
3.1 KiB
C#
71 lines
3.1 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#L168">Jolt/Core/TempAllocator.h:168</see>
|
|
/// <br/>
|
|
/// <c>class TempAllocatorImplWithMallocFallback final : public TempAllocator</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Implementation of the TempAllocator that tries to allocate from a large preallocated block, but falls back
|
|
/// to malloc when it is exhausted
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct TempAllocatorImplWithMallocFallback : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L174">Jolt/Core/TempAllocator.h:174</see>
|
|
/// <br/>
|
|
/// <c>explicit TempAllocatorImplWithMallocFallback(uint inSize)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructs the allocator with an initial fixed block if inSize
|
|
/// </para>
|
|
/// </remarks>
|
|
public static TempAllocatorImplWithMallocFallback Create(uint size) => Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Create(size);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L180">Jolt/Core/TempAllocator.h:180</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.TempAllocatorImplWithMallocFallback_Allocate(this, size);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L189">Jolt/Core/TempAllocator.h:189</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.TempAllocatorImplWithMallocFallback_Free(this, address, size);
|
|
public static implicit operator TempAllocator(TempAllocatorImplWithMallocFallback value) => Jolt.PInvoke.TempAllocatorImplWithMallocFallback_AsTempAllocator(value);
|
|
public void Dispose() => Jolt.PInvoke.TempAllocatorImplWithMallocFallback_Destroy(this);
|
|
}
|
|
}
|