Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetFreeMemory, does a workaround exist yet ?

Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
04-02-2005 17:15
The WIKI says ...


From: someone
llGetFreeMemory returns historic free memory, not current
llGetFreeMemory is supposed to return the current free memory, however, it doesn't. It only ever returns the minimum free memory up until that point, even if the script has since freed it.



someone mentioned a possible workaround might exist, does it ?
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-02-2005 18:35
Easy. Put it in several places in the script, and compare the returned number. :D

Though I'm not sure how functional that'll be in general when the script returns the "max" and you're below it. Conservative estimates are best there. :o
_____________________
---
Caoimhe Armitage
Script Witch
Join date: 7 Sep 2004
Posts: 117
04-03-2005 07:55
llGetFreeMemory is a peice of work. Really. When I was working on the persistent storage script I noticed that over the course of 3 successive calls to it (invoked by RPC over llMessageLinked) that I got three different, progressively smaller numbers. from the 3rd call onwards I would consistenly get the same amount of memory free in the script.

I think the only real answer to script memory management is a priori *estimation* of memory use. This is problematic though since I have seen no good data on how much memory is consumed in the various storage aituations within SL. I was personally appalled at what the overhead per string linst entry *appeared* to be, but without reliable data from llGetFreeMemory, it's very hard to trust anything.

Thus endeth this whinge :)

- C