llGetUsedMemory
Revision as of 02:06, 22 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetUsedMemory( );0.0 | Forced Delay |
10.0 | Energy |
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 LSO always report 16KB memory used.
- This can be called at any time and does not require llScriptProfiler
Examples
Calling llGetUsedMemory can look like this:
integer used_memory = llGetUsedMemory();
llOwnerSay((string)used_memory + " bytes of memory currently used.");
See Also
Functions
• | llGetFreeMemory | |||
• | llSetMemoryLimit | |||
• | llScriptProfiler |