llGetFreeMemory and llGetSPMaxMemory do not work under Luau
Frionil Fang
Not much more to it. llGetFreeMemory report 16000s bytes free at all times, llGetSPMaxMemory reports 16384 whether profiling is on or off. Same applies to pure Luau scripts, neither function returns meaningful values.
~~llGetUsedMemory and ll.GetUsedMemory appear to be ok.~~ <- Edit: redacted, they do not count memory used by tables or strings at all. A table with 10000 random numbers in it is reported as not using any memory, as well as a string with 256k(! that can't be right either) characters. Same applies to lists when compiled as LSL-Luau.
Log In
Kristy Aurelia
Supposedly the
gcinfo()
native lua function gives you "the total heap size in kilobytes, which includes bytecode objects, global tables as well as the script-allocated objects.". But considering not all memory related functions are working, it might be hard to tell if the gcinfo()
is accurate either, and it seems to be returning value in bytes rather that kilobytes.