Sansar Docs
Ask or search…
⌃K

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 float 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 uint 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 uint 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 uint 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 uint 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 void Subscribe (Memory.SubscriptionHandler callback, bool 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 string 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 uint 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 void Memory.SubscriptionHandler (uint TrackingId, MemoryUseLevel 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 string 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 uint 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.Memory 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