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: cs.temp.dll.dll
Syntax
public class OrtArenaCfg : SafeHandle
Constructors
OrtArenaCfg(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
IsInvalid
Overrides SafeHandle.IsInvalid
Declaration
public override bool IsInvalid { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | returns true if handle is equal to Zero |
Methods
ReleaseHandle()
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 |