Memory

Memory, Memory.SubscriptionHandler, MemoryData, and MemoryUseLevel.

Memory Class

The Memory class reports on script pool memory use.

Syntax

Member Details

ActivityLevel Property

Current memory activity level since start of last memory counting.

Syntax

public floatarrow-up-right ActivityLevel { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


PeakUsedBytes Property

The highest level of memory used by the script pool.

Syntax

public uintarrow-up-right PeakUsedBytes { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


PolicyCritical Property

Current policy Critical level of used memory by the script pool

Syntax

public uintarrow-up-right PolicyCritical { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


PolicyLimit Property

Current policy Limit level of used memory by the script pool

Syntax

public uintarrow-up-right PolicyLimit { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


PolicyWarning Property

Current policy Warning level of used memory by the script pool

Syntax

public uintarrow-up-right PolicyWarning { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Subscribe Method

Subscribes to Memory Events.

Syntax

[System.Obsolete("Use subscription callbacks of type Action<Sansar.Script.MemoryData>", false)] public voidarrow-up-right Subscribe (Memory.SubscriptionHandlerarrow-up-right callback, boolarrow-up-right persistent)

Parameters

callback

Callback which is executed when the event completes.

persistent

Optional, set to false to unsubscribe after one event.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Subscribe Method

Subscribes to Memory Events.

Syntax

See Also

Parameters

callback

Callback which is executed when the event completes.

persistent

Optional, set to false to unsubscribe after one event.

Returns

An Sansar.Script.IEventSubscription that can be used to cancel the subscription.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


ToString Method

A string representation of this object.

Syntax

public override stringarrow-up-right ToString ()

Returns

A string representation of this object.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


UsedBytes Property

Total bytes used by this script pool as of last accounting.

Syntax

public uintarrow-up-right UsedBytes { get; }

Value

uint

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


Memory.SubscriptionHandler Delegate

Notifies scripts about memory events.

Syntax

[System.Obsolete("Use subscription callbacks of type Action<Sansar.Script.MemoryData>", false)] public delegate voidarrow-up-right Memory.SubscriptionHandler (uintarrow-up-right TrackingId, MemoryUseLevelarrow-up-right UseLevel)

Parameters

TrackingId

The id of the animation component.L:\p\Sansar\SharedBranches\ServerScript\Code\Common\Libraries\LLScript/Apis/ScriptMemory.h(75)The id of the component generating the event.

UseLevel

The behavior name of the Animation.L:\p\Sansar\SharedBranches\ServerScript\Code\Common\Libraries\LLScript/Apis/ScriptMemory.h(75)This name will match the subscribed event.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

MemoryData Class

Notifies scripts about memory events.

Syntax

Member Details

ToString Method

A string representation of this object.

Syntax

public override stringarrow-up-right ToString ()

Returns

A string representation of this object.

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


TrackingId Property

Internal Id of the memory tracker.D:\work\647144a9cd6c61be\Sansar\Code\Common\Libraries\LLScript/Apis/CsScriptMemory.h(84)Used for routing the event.

Syntax

public uintarrow-up-right TrackingId { get; }

Value

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


UseLevel Property

The level subscribed to.D:\work\647144a9cd6c61be\Sansar\Code\Common\Libraries\LLScript/Apis/CsScriptMemory.h(84)

Syntax

Value

Remarks

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0


MemoryUseLevel Enum

Used by Sansar.Script.Memoryarrow-up-right to report script memory use.

Syntax

public enum MemoryUseLevel

Remarks

Members

Member Name
Description

Critical

Critical memory use, nearing limit.

Limit

Memory limit hit, if nothing is done scripts in this pool may be disabled.

Low

Script memory use under Warning level.

Warning

First warning of high memory use.

Requirements

Namespace: Sansar.Script Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0

Last updated