Show / Hide Table of Contents

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
Object
CriticalFinalizerObject
SafeHandle
OrtArenaCfg
Implements
IDisposable
Inherited Members
SafeHandle.handle
SafeHandle.Close()
SafeHandle.DangerousAddRef(Boolean)
SafeHandle.DangerousGetHandle()
SafeHandle.DangerousRelease()
SafeHandle.Dispose()
SafeHandle.Dispose(Boolean)
SafeHandle.SetHandle(IntPtr)
SafeHandle.SetHandleAsInvalid()
SafeHandle.IsClosed
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Microsoft.ML.OnnxRuntime
Assembly: Microsoft.ML.OnnxRuntime.dll
Syntax
public class OrtArenaCfg : SafeHandle, IDisposable

Constructors

| Improve this Doc View Source

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
UInt32 maxMemory

Maximum amount of memory the arena allocates

Int32 arenaExtendStrategy

Strategy for arena expansion

Int32 initialChunkSizeBytes

Size of the region that the arena allocates first

Int32 maxDeadBytesPerChunk

Maximum amount of fragmentation allowed per chunk

Properties

| Improve this Doc View Source

IsInvalid

Overrides SafeHandle.IsInvalid

Declaration
public override bool IsInvalid { get; }
Property Value
Type Description
Boolean

returns true if handle is equal to Zero

Overrides
System.Runtime.InteropServices.SafeHandle.IsInvalid

Methods

| Improve this Doc View Source

ReleaseHandle()

Overrides SafeHandle.ReleaseHandle() to properly dispose of the native instance of OrtEnv

Declaration
protected override bool ReleaseHandle()
Returns
Type Description
Boolean

always returns true

Overrides
System.Runtime.InteropServices.SafeHandle.ReleaseHandle()

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top