Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

log email queue - but llGetFreeMemory doesn't get reset???

Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
03-30-2006 13:25
Hi - I have a log queueing script that after it gets nearly full (using llGetFreeMemory) as a check, it sends an email out and empties the string buffer.

Only problem is after it resets the string buffer the llGetFreeMemory() call doesn't (as per the wiki) report the new higher value of memory available.

What do people usually do here?

I could at reset note the size of the string buffer when it first hits the memory limit I suppose and then use this as the means of checking from here on in.

Cheers
Greg Hauptmann
Registered User
Join date: 30 Oct 2005
Posts: 283
04-02-2006 07:06
Oh,

I'm also getting memory errors when sending the scripts after building up about 3200 characters of log lines. I think is because I fill up my string buffer close to the limit of the script but then when I go to send it I try to use my email script manager (via a link message), so when I go to send the LINK message I'm guessing it may need to create another copy of the string buffer (over 3200 characters) on the stack or heap (?) which then takes it over the limit? E.g.

CODE
callMethod(0, "sendEmailData", [addr, "Error/Audit", emailStringBuffer]);   


Does a LINK message where a global variable is used require the additional use of memory equal to the global variable being passed?

I guess I could just send the email via within the script, but then I'd lose the benefit of my email system to avoid the immediate email delay (although perhaps the log messages [link message] would build up in the script buffer ready to be handled once the queue script returned)

Else I could stick with the current approach but limit the size to 1/2 the available memory, one half for the string buffer, and another equal half to allow the script to make a successful LINK call to pass the string buffer message out?



Thanks