mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 13:38:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
65
Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs
Normal file
65
Brutal.Jolt/Generated/Classes/TempAllocatorMalloc.gen.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// 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
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L135">Jolt/Core/TempAllocator.h:135</see>
|
||||
/// <br/>
|
||||
/// <c>class TempAllocatorMalloc final : public TempAllocator</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct TempAllocatorMalloc : IDisposable
|
||||
{
|
||||
public static TempAllocatorMalloc Create() => Jolt.PInvoke.TempAllocatorMalloc_Create();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// See: TempAllocator
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L141">Jolt/Core/TempAllocator.h:141</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void * Allocate(uint inSize) override</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorMalloc_Allocate(this, size);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// See: TempAllocator
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L155">Jolt/Core/TempAllocator.h:155</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void Free(void *inAddress, uint inSize) override</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorMalloc_Free(this, address, size);
|
||||
|
||||
public static implicit operator TempAllocator(TempAllocatorMalloc value) =>
|
||||
Unsafe.BitCast<TempAllocatorMalloc, TempAllocator>(value);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.TempAllocatorMalloc_Destroy(this);
|
||||
|
||||
/// <inheritdoc cref="TempAllocator.Allocate(ByteSize)"/>
|
||||
public unsafe Ptr Allocate(ByteSize size) => ((TempAllocator)this).Allocate(size);
|
||||
|
||||
/// <inheritdoc cref="TempAllocator.Free(Ptr, ByteSize)"/>
|
||||
public unsafe void Free(Ptr address, ByteSize size) => ((TempAllocator)this).Free(address, size);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue