aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs
diff options
context:
space:
mode:
authorUbitUmarov2019-11-22 04:09:05 +0000
committerUbitUmarov2019-11-22 04:09:05 +0000
commit9b7ad30ee12ee027be6cd93d4e17d67cf0b65966 (patch)
treeb65bb712629d9810c382a0f34e718af9107a6cd8 /OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs
parentcosmetics (diff)
downloadopensim-SC-9b7ad30ee12ee027be6cd93d4e17d67cf0b65966.zip
opensim-SC-9b7ad30ee12ee027be6cd93d4e17d67cf0b65966.tar.gz
opensim-SC-9b7ad30ee12ee027be6cd93d4e17d67cf0b65966.tar.bz2
opensim-SC-9b7ad30ee12ee027be6cd93d4e17d67cf0b65966.tar.xz
more changes on YEngine scripts heap usage
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs
index 1797c93..f3e38c4 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMRHeapTracker.cs
@@ -106,9 +106,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
106 public void Save(LSL_List lis) 106 public void Save(LSL_List lis)
107 { 107 {
108 if (lis == null) 108 if (lis == null)
109 usage = instance.UpdateHeapUse(usage, 0); 109 usage = instance.UpdateLocalsHeapUse(usage, 0);
110 else 110 else
111 usage = instance.UpdateHeapUse(usage, Size(lis)); 111 usage = instance.UpdateLocalsHeapUse(usage, Size(lis));
112 value = lis; 112 value = lis;
113 } 113 }
114 114
@@ -190,8 +190,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
190 190
191 public void Save(object obj) 191 public void Save(object obj)
192 { 192 {
193 int newuse = Size(obj); 193 usage = instance.UpdateLocalsHeapUse(usage, Size(obj));
194 usage = instance.UpdateHeapUse(usage, newuse);
195 value = obj; 194 value = obj;
196 } 195 }
197 196
@@ -305,8 +304,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
305 304
306 public void Save(string str) 305 public void Save(string str)
307 { 306 {
308 int newuse = Size(str); 307 usage = instance.UpdateLocalsHeapUse(usage, Size(str));
309 usage = instance.UpdateHeapUse(usage, newuse);
310 value = str; 308 value = str;
311 } 309 }
312 310
@@ -318,7 +316,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
318 316
319 public static int Size(string str) 317 public static int Size(string str)
320 { 318 {
321 return (str == null) ? 0 : str.Length * HeapTrackerObject.HT_CHAR; 319 return string.IsNullOrWhiteSpace(str) ? 0 : str.Length * HeapTrackerObject.HT_CHAR;
322 } 320 }
323 } 321 }
324} 322}