getUsedRAM

getUsedRAM() → integer ram

Returns the RAM used by your AI, in bytes, to compare with getMaxRAM. In LeekScript it is a count: 8 bytes per stored value, plus a base cost per list, map, set or object, and the AI's compiled code, counted two bytes per bytecode byte and shared between the leeks running the same AI. In JavaScript, TypeScript and Python, it is the memory the AI really retains, the language's libraries included.

Return
See also