aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-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;