aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2019-04-16 00:07:13 +0100
committerUbitUmarov2019-04-16 00:07:13 +0100
commit2fa5d10c00d09f48dadc1a43a9ff191389e8d4d1 (patch)
tree9fc9431c40115bf2ab8580e5f13b8e8dd02d79f4 /OpenSim/Region
parentmantis 8518: Yengine; we can't wait for GC (worse finalizers) to count releas... (diff)
downloadopensim-SC-2fa5d10c00d09f48dadc1a43a9ff191389e8d4d1.zip
opensim-SC-2fa5d10c00d09f48dadc1a43a9ff191389e8d4d1.tar.gz
opensim-SC-2fa5d10c00d09f48dadc1a43a9ff191389e8d4d1.tar.bz2
opensim-SC-2fa5d10c00d09f48dadc1a43a9ff191389e8d4d1.tar.xz
Ynegine: add some missing memory usage on script reset
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs
index f21116e..65bdf51 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstAbstract.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
86 86
87 public void Clear() 87 public void Clear()
88 { 88 {
89 heapUse = 0; 89 int newheapUse = 0;
90 if(iarArrays != null) 90 if(iarArrays != null)
91 { 91 {
92 foreach(XMR_Array xa in iarArrays) 92 foreach(XMR_Array xa in iarArrays)
@@ -100,9 +100,19 @@ namespace OpenSim.Region.ScriptEngine.Yengine
100 iarObjects = new object[iarObjects.Length]; 100 iarObjects = new object[iarObjects.Length];
101 if(iarStrings != null) 101 if(iarStrings != null)
102 iarStrings = new string[iarStrings.Length]; 102 iarStrings = new string[iarStrings.Length];
103 if (iarFloats != null)
104 newheapUse += iarFloats.Length * HeapTrackerObject.HT_DOUB;
105 if (iarIntegers != null)
106 newheapUse += iarIntegers.Length * HeapTrackerObject.HT_INT;
107 if (iarRotations != null)
108 newheapUse += iarRotations.Length * HeapTrackerObject.HT_ROT;
109 if (iarVectors != null)
110 newheapUse += iarVectors.Length * HeapTrackerObject.HT_VEC;
111
112 heapUse = instance.UpdateHeapUse(0, newheapUse);
103 } 113 }
104 114
105 public void AllocVarArrays(XMRInstArSizes ars) 115 public void AllocVarArrays(XMRInstArSizes ars)
106 { 116 {
107 ClearOldArrays(); 117 ClearOldArrays();
108 int newuse = heapUse + 118 int newuse = heapUse +
@@ -204,7 +214,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
204 214
205 // value types simply are the size of the value * number of values 215 // value types simply are the size of the value * number of values
206 newheapuse += chrs.Length * HeapTrackerObject.HT_CHAR; 216 newheapuse += chrs.Length * HeapTrackerObject.HT_CHAR;
207 newheapuse += flts.Length * HeapTrackerObject.HT_SFLT; 217 newheapuse += flts.Length * HeapTrackerObject.HT_DOUB;
208 newheapuse += ints.Length * HeapTrackerObject.HT_INT; 218 newheapuse += ints.Length * HeapTrackerObject.HT_INT;
209 newheapuse += rots.Length * HeapTrackerObject.HT_ROT; 219 newheapuse += rots.Length * HeapTrackerObject.HT_ROT;
210 newheapuse += vecs.Length * HeapTrackerObject.HT_VEC; 220 newheapuse += vecs.Length * HeapTrackerObject.HT_VEC;