Difference between revisions of "LlGetUsedMemory"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 28: Line 28:
</lsl>
</lsl>
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetFreeMemory]]|}}
{{LSL DefineRow||[[llScriptProfiler]]|}}
|also_events
|also_events
|also_tests
|also_tests

Revision as of 17:12, 17 April 2011

Summary

Function: integer llGetUsedMemory( );

Returns the integer of the number of bytes of memory currently in use by the script.

Specification

This function's behavior is dependent upon the VM the script is using. Mono is the new VM, LSO is the old VM. The big difference between between Mono and LSO is that Mono scripts run faster and can utilize four times more memory.

Mono

In Mono the value returned is the amount of memory currently in use by the script.

LSO

LSO scripts always use 16KiB of memory.

Caveats

  • Scripts compiled to LSL always report 16KiB memory used.
  • This can be called at any time and does not require llScriptProfiler
All Issues ~ Search JIRA for related Bugs

Examples

Calling llGetUsedMemory can look like this: <lsl> integer used_memory = llGetUsedMemory(); llOwnerSay((string)used_memory + " bytes of memory currently used.");

</lsl>

See Also

Functions

•  llGetFreeMemory
•  llScriptProfiler

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetUsedMemory();