Advertisement
Dorex

Untitled

Jul 22nd, 2023
1,890
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer limit = 20000; // <- bytes
  2.  
  3. Test()
  4. {
  5.     llSay(0, "Limited Memory " + (string)llGetMemoryLimit() +
  6.               "\nUsed Memory " + (string)llGetUsedMemory() +
  7.               "\nFree Memory " + (string)llGetFreeMemory());
  8. }
  9.  
  10. default
  11. {
  12.     state_entry()
  13.     {
  14.         llSetMemoryLimit(limit);
  15.        
  16.         llScriptProfiler(PROFILE_SCRIPT_MEMORY);
  17.         Test();
  18.         llScriptProfiler(PROFILE_NONE);
  19.        
  20.         llSay(0,"This script used at most " + (string)llGetSPMaxMemory() + " bytes of memory during Test.");
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement