User:TxMasterG Ping/llGetFreeMemory

From Second Life Wiki
Jump to navigation Jump to search

llGetFreeMemory() will not always show the avalible free memory!

Example

default
{
    state_entry()
    {
        llSay(0,"llGetFreeMemory() returned: "+(string)llGetFreeMemory()+"byte(s)");
        //outputs what llGetFreeMemory() returns in bytes
        if(TRUE)
        {
            list TEST1;
            TEST1=[1,5334,"Blah, blah, blah",<345,3.78,34>,<0,0,0,1>,"TEST"];
            TEST1=TEST1+TEST1+llGetFreeMemory();
            integer i;
            for(i=0;i<llGetListLength(TEST1);i++)
            {
                llSay(0,"Item number "+(string)i+" in the list is: "+llList2String(TEST1,i));
            }
            TEST1 = [];
        }
        llSay(0,"List deleted!");
        llSay(0,"Now llGetFreeMemory returns: "+(string)llGetFreeMemory());
    }
}