add mem_sum() convenience function
parent
16369fadd7
commit
2842ba291c
|
|
@ -10,7 +10,7 @@
|
||||||
* *
|
* *
|
||||||
* UTILS COMPONENT *
|
* 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 *
|
* 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
|
// SOUND_DEFAULT: a placeholder sound, meant to complement SL's TEXTURE_DEFAULT
|
||||||
#define SOUND_DEFAULT "f1adc36c-4c3f-081b-4ab2-fa5105d80561"
|
#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
|
#endif // UTILS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue