ronXt Posted May 25, 2020 Share Posted May 25, 2020 How much data can we store in a list? (Assuming the list have only string data) And if there is a limit, how can we find it out before it go overflow. Link to comment Share on other sites More sharing options...
Rolig Loon Posted May 25, 2020 Share Posted May 25, 2020 There's no limit to the size of a list, but you can certainly overflow the memory limit for your script by stuffing too much data into a list. The way to avoid that is to monitor llGetFreeMemory and then panic when it gets too low. 1 Link to comment Share on other sites More sharing options...
Gomez Vlodovic Posted February 11, 2022 Share Posted February 11, 2022 On 5/25/2020 at 10:54 PM, Rolig Loon said: There's no limit to the size of a list, but you can certainly overflow the memory limit for your script by stuffing too much data into a list. The way to avoid that is to monitor llGetFreeMemory and then panic when it gets too low. default{ state_entry(){ integer fm = llGetFreeMemory(); if (fm < 1024){ state panic; } } // state_entry } // default state panic{ state_entry(){ llAttemptGarbageCollection(); llFreakOut(); llHaltAndCatchFire(); } } Here because I had this exact list limit question. There's also this, where LepreKhaun 'splains that the 64k limit has some flexibility under mono: Link to comment Share on other sites More sharing options...
Mollymews Posted February 12, 2022 Share Posted February 12, 2022 see this thread for animats workround for forcing garbage collection Link to comment Share on other sites More sharing options...
animats Posted February 12, 2022 Share Posted February 12, 2022 Don't force garbage collections unless you have to. They're slow. The idea is to wait until it looks like you're running out of memory, then force a GC and recheck before taking other actions to avoid running out of memory. Unless you have a script which really can do something useful when nearly out of memory, don't force a GC. A good use would be a greeter script that kept track of recent visitors. If llGetFreeMemory indicates it is close to running out of memory, it should remove the oldest entries. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now