Struct LogMemoryManagerParameters
Initialization parameters for LogMemoryManager.
Inherited Members
Namespace: Unity.Logging
Assembly: Unity.Logging.dll
Syntax
[BurstCompile]
public struct LogMemoryManagerParameters
Fields
BufferGrowFactor
Factor by which the default Payload container increases in size, when growth threshold is reached.
Declaration
public float BufferGrowFactor
Field Value
Type | Description |
---|---|
float |
BufferGrowThreshold
Default Payload container capacity will increase in size when the average usage goes over this ratio.
Declaration
public float BufferGrowThreshold
Field Value
Type | Description |
---|---|
float |
Remarks
Setting to 0 will disable dynamic "growing" operations; Payload containers may shrink in size but won't automatically grow.
BufferSampleCount
Number of samples used for computing moving average of default Payload container capacity.
Declaration
public uint BufferSampleCount
Field Value
Type | Description |
---|---|
uint |
Remarks
Setting this to 0 will disable all dynamic resizing operations.
BufferShrinkFactor
Factor by which the default Payload container decreases in size, when shrink threshold is reached.
Declaration
public float BufferShrinkFactor
Field Value
Type | Description |
---|---|
float |
BufferShrinkThreshold
Default Payload container capacity will decrease in size when the average usage goes below this ratio.
Declaration
public float BufferShrinkThreshold
Field Value
Type | Description |
---|---|
float |
Remarks
Setting to 0 will disable dynamic "shrinking" operations; Payload containers may grow in size but won't automatically shrink.
DefaultBufferCapacity
Default value for InitialBufferCapacity
Declaration
public const uint DefaultBufferCapacity = 65536
Field Value
Type | Description |
---|---|
uint |
DefaultBufferGrowFactor
Default value for BufferGrowFactor
Declaration
public const float DefaultBufferGrowFactor = 2
Field Value
Type | Description |
---|---|
float |
DefaultBufferGrowThreshold
Default value for BufferGrowThreshold
Declaration
public const float DefaultBufferGrowThreshold = 0.7
Field Value
Type | Description |
---|---|
float |
DefaultBufferSampleCount
Default value for BufferSampleCount
Declaration
public const uint DefaultBufferSampleCount = 60
Field Value
Type | Description |
---|---|
uint |
DefaultBufferShrinkFactor
Default value for BufferShrinkFactor
Declaration
public const float DefaultBufferShrinkFactor = 0.85
Field Value
Type | Description |
---|---|
float |
DefaultBufferShrinkThreshold
Default value for BufferShrinkThreshold
Declaration
public const float DefaultBufferShrinkThreshold = 0
Field Value
Type | Description |
---|---|
float |
DefaultDispatchQueueSize
Default value for DispatchQueueSize
Declaration
public const int DefaultDispatchQueueSize = 16384
Field Value
Type | Description |
---|---|
int |
DefaultOverflowBufferSize
Default value for OverflowBufferSize
Declaration
public const uint DefaultOverflowBufferSize = 163840
Field Value
Type | Description |
---|---|
uint |
DispatchQueueSize
Max count of Log messages between updates. DispatchQueue
Declaration
public int DispatchQueueSize
Field Value
Type | Description |
---|---|
int |
InitialBufferCapacity
Starting size of the default Payload container.
Declaration
public uint InitialBufferCapacity
Field Value
Type | Description |
---|---|
uint |
OverflowBufferSize
Size of the "overflow" buffer, which is another UnsafePayloadRingBuffer instance, to hold allocations if the default buffer becomes full.
Declaration
public uint OverflowBufferSize
Field Value
Type | Description |
---|---|
uint |
Remarks
The overflow buffer is never resized and always holds this allocated memory throughout MemoryManager's lifetime, regardless if it's used or not. The purpose is to safeguard against the default buffer filling up before it can be resized. Set this value to 0 to disable use of the overflow buffer.
Properties
Default
Get default settings
Declaration
public static LogMemoryManagerParameters Default { get; }
Property Value
Type | Description |
---|---|
LogMemoryManagerParameters |
HeavyLoad
Get heavy load settings
Declaration
public static LogMemoryManagerParameters HeavyLoad { get; }
Property Value
Type | Description |
---|---|
LogMemoryManagerParameters |
IsAutomaticBufferGrowthEnabled
Returns if automatic Payload container growth is specifically enabled.
Declaration
public bool IsAutomaticBufferGrowthEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsAutomaticBufferResizeEnabled
Returns if automatic Payload container resizing is enabled at all.
Declaration
public bool IsAutomaticBufferResizeEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsAutomaticBufferShrinkEnabled
Returns if automatic Payload container shrink is specifically enabled.
Declaration
public bool IsAutomaticBufferShrinkEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
IsOverflowBufferEnabled
True if Overflow Buffer is used (its size > 0). OverflowBufferSize
Declaration
public bool IsOverflowBufferEnabled { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
GetDefaultParameters(out LogMemoryManagerParameters)
Creates a LogMemoryManagerParameters instance holding default values.
Declaration
public static void GetDefaultParameters(out LogMemoryManagerParameters defaultParams)
Parameters
Type | Name | Description |
---|---|---|
LogMemoryManagerParameters | defaultParams | Returned instance |
GetHeavyLoadParameters(out LogMemoryManagerParameters)
Creates a LogMemoryManagerParameters instance holding heavy-load-case values.
Declaration
public static void GetHeavyLoadParameters(out LogMemoryManagerParameters defaultParams)
Parameters
Type | Name | Description |
---|---|---|
LogMemoryManagerParameters | defaultParams | Returned instance |