mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
57 lines
2.3 KiB
C#
57 lines
2.3 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#L15">Jolt/Core/TempAllocator.h:15</see>
|
|
/// <br/>
|
|
/// <c>class TempAllocator : public NonCopyable</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Allocator for temporary allocations.
|
|
/// This allocator works as a stack: The blocks must always be freed in the reverse order as they are allocated.
|
|
/// Note that allocations and frees can take place from different threads, but the order is guaranteed though
|
|
/// job dependencies, so it is not needed to use any form of locking.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct TempAllocator
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L27">Jolt/Core/TempAllocator.h:27</see>
|
|
/// <br/>
|
|
/// <c>virtual void * Allocate(uint inSize) = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned
|
|
/// </para>
|
|
/// </remarks>
|
|
public unsafe Ptr Allocate(ByteSize size) => Jolt.PInvoke.TempAllocator_Allocate(this, (uint)size);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TempAllocator.h#L30">Jolt/Core/TempAllocator.h:30</see>
|
|
/// <br/>
|
|
/// <c>virtual void Free(void *inAddress, uint inSize) = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Frees inSize bytes of memory located at inAddress
|
|
/// </para>
|
|
/// </remarks>
|
|
public unsafe void Free(Ptr address, ByteSize size) => Jolt.PInvoke.TempAllocator_Free(this, address, (uint)size);
|
|
}
|
|
}
|