Stack Heap Collision
occurs when the script
runs out of memory
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 call
s (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.
scripts are each currently allocated 16KB of memory, in which the compiled script's bytecode
and the above-mentioned stack and heap are stored.