Don't click here unless you want to be banned.

LSL Wiki : StackHeapCollision

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Stack Heap Collision


This error occurs when the script runs out of memory (the stack and heap pointers, which count from opposite directions, meet in the middle, thus the name "stack/heap collision"). To avoid this, check the available memory before doing any memory-intensive calls (particularly those involving lists) using llGetFreeMemory.

Remember that llGetFreeMemory will not return the current available memory but, rather, the historic free memory--the lowest amount of free memory that the script has ever had while running. This could cause a situation where the script has several kilobytes of memory free, but "thinks" it only has a few bytes available. Other than to suggest that the script is redesigned in such a way that this can't happen, there isn't a workaround for this situation.

LSL scripts are each currently allocated 16KB of memory, in which the compiled script's bytecode and the above-mentioned stack and heap are stored.


Errors | Memory
There is one comment on this page. [Display comments/form]