Difference between revisions of "LlGetUsedMemory"

From Second Life Wiki
Jump to: navigation, search
m (LSL to LSO)
m (llSetMemoryLimit wasn't added.)
Line 30: Line 30:
{{LSL DefineRow||[[llGetFreeMemory]]|}}
{{LSL DefineRow||[[llGetFreeMemory]]|}}
{{LSL DefineRow||[[llSetMemoryLimit]]|}}
{{LSL DefineRow||[[llScriptProfiler]]|}}
{{LSL DefineRow||[[llScriptProfiler]]|}}

Revision as of 11:58, 20 September 2012


Function: integer llGetUsedMemory( );

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


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.


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


LSO scripts always use 16KiB of memory.


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


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


See Also


•  llGetFreeMemory
•  llSetMemoryLimit
•  llScriptProfiler

Deep Notes

Search JIRA for related Issues


function integer llGetUsedMemory();