Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Checking Remaining Memory

Relee Baysklef
Irresistable Squirrel
Join date: 18 Sep 2003
Posts: 360
05-10-2005 11:39
Hi All. I'm working on an experiment in my lab in Abbotts, and I found that it was unresponsive when I went to check it today.

I don't know what could have caused that, but the only hypothesis that I have is that it filled up the memory allocated to itself and ceased function.

Is there an lsl function to check the remaining memory? I'd like to set this script up to make sure it stops itself before that memory point is reached.
_____________________
-- Relee the Squirrel --
Jon Marlin
Builder, Coder, RL & SL
Join date: 10 Mar 2005
Posts: 297
05-10-2005 11:42
From: Relee Baysklef
Is there an lsl function to check the remaining memory?


I think you're looking for llGetFreeMemory...

http://secondlife.com/badgeo/wakka.php?wakka=llGetFreeMemory

- Jon
Relee Baysklef
Irresistable Squirrel
Join date: 18 Sep 2003
Posts: 360
05-10-2005 17:22
Yes, that's exactly what I was looking for. Thank you.

Edit: ACK! But I see that it says that the function is broken... That's not good.
_____________________
-- Relee the Squirrel --
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
05-10-2005 17:50
Well, it's only sort of broken. :)

llGetFreeMemory returns the historic free memory, so the lowest point during your script up until that point, not the current free memory. If your script isn't building things like lists, or playing around with lots of strings, you're probably not going to have much of a problem with it the way it is. However, being that most people that will want to use it want it for just that reason... yeah, it can be tricky.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Synergy Belvedere
Prim Reaper
Join date: 7 Jul 2004
Posts: 253
05-11-2005 08:02
From: Catherine Omega
Well, it's only sort of broken. :)

llGetFreeMemory returns the historic free memory, so the lowest point during your script up until that point, not the current free memory.


Catherine - the other thread that i had on this shows that my script was showing 157 free memory then reporting stack-heap collisions, after I took all my funcitons out and moved them to a second script, the main script shows 7292 free memory. I think it's been fixed?
_____________________
----------------------------------------------------------
--The mind's eye is limited only by its focus--