From 2842ba291c723e37b1205e6d81e23acc93fa55f5 Mon Sep 17 00:00:00 2001 From: rhetorica Date: Fri, 30 Jan 2026 18:49:51 -0800 Subject: [PATCH] add mem_sum() convenience function --- utils.lsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.lsl b/utils.lsl index 2a9dc05..7c8852a 100644 --- a/utils.lsl +++ b/utils.lsl @@ -10,7 +10,7 @@ * * * UTILS COMPONENT * * * - * Copyright, (C) Nanite Systems Corp., 1984-85, 2017-25 * + * Copyright, (C) Nanite Systems Corp., 1984-85, 2017-26 * * * * Copyright, (C) University of Michigan 1977-1981 * * * @@ -406,4 +406,7 @@ string hex(integer bits) { // SOUND_DEFAULT: a placeholder sound, meant to complement SL's TEXTURE_DEFAULT #define SOUND_DEFAULT "f1adc36c-4c3f-081b-4ab2-fa5105d80561" +// mem_sum(): string describing current memory state +#define mem_sum() ("[" + llGetScriptName() + "] " + (string)llGetFreeMemory() + " bytes free; " + (string)llGetUsedMemory() + " used (" + (string)((integer)(100 * llGetUsedMemory() / llGetMemoryLimit())) + "%)") + #endif // UTILS