// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Script memory snapshot // Not compiled or tested in-world // Setup: Touch as owner. To inspect your own code, integrate the three reporting calls into that script. // Stop / restore: Remove or disable the script. It does not change the build. // Notes: This cannot inspect another script’s allocations. Mono and LSO report differently; OpenSim engines may differ again. A single snapshot does not predict peak use. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. default { touch_start(integer count) { if (llDetectedKey(0) != llGetOwner()) return; llOwnerSay("This script used bytes: " + (string)llGetUsedMemory()); llOwnerSay("This script free bytes: " + (string)llGetFreeMemory()); llOwnerSay("This script memory limit: " + (string)llGetMemoryLimit()); } changed(integer flags) { if (flags & CHANGED_OWNER) llResetScript(); } }