Difference between revisions of "LlSetMemoryLimit"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 7: Line 7:
|return_type=integer
|return_type=integer
|func_desc=Request ''limit'' bytes to be reserved for this script.
|func_desc=Request ''limit'' bytes to be reserved for this script.
|Return_text=of the new maximum bytes the script can use. {{Hilite|''That's a guess, verify this! It could also be a [[Template:LSL Constants/ReturnStatus|Success/Failure Flag]]''}}
|Return_text=Returns [[Template:LSL Constants/ReturnStatus|Success/Failure Flag]] for whether the memory limit was set.
|func_footer
|func_footer
|spec=
|spec=
This function's behavior is dependent upon the VM the script is using. [[#Mono|Mono]] is the new VM, [[#LSO|LSO]] is the old VM.
This function's behavior is dependent upon the VM the script is using. [[#Mono|Mono]] is the new VM, [[#LSO|LSO]] is the old VM.


;Mono:At present, a maximum of 65536 bytes can be reserved. 65536 is also the default.  
;Mono:Sets the memory limit for the script.
* The memory limit can be set up to 64k.
* The memory limit can not be set lower than the memory currently in use by the script.
* All new scripts start with a limit of 64k
* All existing scripts have a limit of 64k
* A lower limit will effect the amount of memory reported in the viewer UI and by llGetObjectDetails.


;LSO:Always returns 16384, the fixed LSO memory size.
;LSO:Has no effect on LSO scripts which will always use exactly 16k
|caveats
|caveats
|constants
|constants

Revision as of 08:50, 10 August 2011

Emblem-important-red.png Pre-release Documentation Warning!

This function is not available yet. This documentation was written prior to its final release so it may not match the final implementation.

Summary

Function: integer llSetMemoryLimit( integer limit );

Request limit bytes to be reserved for this script.
Returns the integer Returns Success/Failure Flag for whether the memory limit was set.

• integer limit

Specification

This function's behavior is dependent upon the VM the script is using. Mono is the new VM, LSO is the old VM.

Mono
Sets the memory limit for the script.
  • The memory limit can be set up to 64k.
  • The memory limit can not be set lower than the memory currently in use by the script.
  • All new scripts start with a limit of 64k
  • All existing scripts have a limit of 64k
  • A lower limit will effect the amount of memory reported in the viewer UI and by llGetObjectDetails.
LSO
Has no effect on LSO scripts which will always use exactly 16k

Examples

See Also

Functions

•  llGetFreeMemory
•  llGetUsedMemory
•  llGetObjectDetails

Deep Notes

History

  • Scheduled for RC Magnum channel, week of August 3, 2011.

Search JIRA for related Issues

Signature

function integer llSetMemoryLimit( integer limit );