Struct UnsafePayloadRingBuffer
Logging system's primary container for allocating Payload buffers.
Implements
Inherited Members
Namespace: Unity.Logging
Assembly: solution.dll
Syntax
[BurstCompile]
public struct UnsafePayloadRingBuffer : IDisposable
Remarks
This container provides the backing memory for message buffers referenced by Log
This container is utilized internally by Log
Constructors
Name | Description |
---|---|
Unsafe |
Initializes a new instance of the container. |
Fields
Name | Description |
---|---|
Align |
Power of 2 align value used in Round |
Buffer |
Unique ID value assigned by the user which identifies PayloadHandle as referencing allocations from this instance. |
Maximum |
Maximum capacity of the container. |
Maximum |
Maximum size for a single Payload block (excludes header) that can be allocated. |
Minimum |
Minimum capacity of the container. |
Minimum |
Minimum size for a single Payload block (excludes header) that can be allocated. |
Properties
Name | Description |
---|---|
Bytes |
Total number of bytes currently allocated from the RingBuffer, including payload headers. |
Bytes |
Max value of Bytes |
Capacity | Capacity of the RingBuffer, which cannot change after RingBuffer has been initialized |
Is |
Returns true if RingBuffer is initialized and not Disposed. |
Maximum |
Returns the maximum number of Payloads that can be referenced within a single DisjointedBuffer. |
Methods
Name | Description |
---|---|
Allocate |
Allocate a block of memory from the container. |
Debug |
Debug function that returns details about a particular Payload |
Dispose() | Frees the container's memory and returns this instance to an uninitialized state. |
Is |
Checks if the specified handle currently references a valid memory block. |
Reclaim |
Reclaims any and all freed memory blocks from the "tail" of the RingBuffer. |
Release |
Releases the memory block referenced by the specified handle. |
Retrieve |
Retrieves a NativeArray for the allocated memory block referenced by the specified handle. |
Retrieve |
Retrieves a NativeArray for the allocated memory block referenced by the specified handle. |
Round |
Changes the input size to the size that is aligned to Align |