Class OrtArenaCfg
This class encapsulates arena configuration information that will be used to define the behavior of an arena based allocator See docs/C_API.md for more details
Inheritance
System.Object
OrtArenaCfg
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class OrtArenaCfg : SafeHandle
Constructors
| Improve this Doc View SourceOrtArenaCfg(UInt32, Int32, Int32, Int32)
Create an instance of arena configuration which will be used to create an arena based allocator See docs/C_API.md for details on what the following parameters mean and how to choose these values
Declaration
public OrtArenaCfg(uint maxMemory, int arenaExtendStrategy, int initialChunkSizeBytes, int maxDeadBytesPerChunk)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | maxMemory | Maximum amount of memory the arena allocates |
System.Int32 | arenaExtendStrategy | Strategy for arena expansion |
System.Int32 | initialChunkSizeBytes | Size of the region that the arena allocates first |
System.Int32 | maxDeadBytesPerChunk | Maximum amount of fragmentation allowed per chunk |
Properties
| Improve this Doc View SourceIsInvalid
Overrides SafeHandle.IsInvalid
Declaration
public override bool IsInvalid { get; }
Property Value
Type | Description |
---|---|
System.Boolean | returns true if handle is equal to Zero |
Methods
| Improve this Doc View SourceReleaseHandle()
Overrides SafeHandle.ReleaseHandle() to properly dispose of the native instance of OrtEnv
Declaration
protected override bool ReleaseHandle()
Returns
Type | Description |
---|---|
System.Boolean | always returns true |