aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Physics/Meshing/Mesh.cs6
2 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 95d69a1..4776bed 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1107,6 +1107,11 @@ namespace OpenSim.Region.Framework.Scenes
1107 } 1107 }
1108 if (loginsdisabled && (m_frame > 20)) 1108 if (loginsdisabled && (m_frame > 20))
1109 { 1109 {
1110 // In 99.9% of cases it is a bad idea to manually force garbage collection. However,
1111 // this is a rare case where we know we have just went through a long cycle of heap
1112 // allocations, and there is no more work to be done until someone logs in
1113 GC.Collect();
1114
1110 m_log.Debug("[REGION]: Enabling Logins"); 1115 m_log.Debug("[REGION]: Enabling Logins");
1111 loginsdisabled = false; 1116 loginsdisabled = false;
1112 } 1117 }
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs
index 4c3cf33..e8a3e19 100644
--- a/OpenSim/Region/Physics/Meshing/Mesh.cs
+++ b/OpenSim/Region/Physics/Meshing/Mesh.cs
@@ -174,6 +174,9 @@ namespace OpenSim.Region.Physics.Meshing
174 174
175 float[] result = getVertexListAsFloat(); 175 float[] result = getVertexListAsFloat();
176 m_pinnedVertexes = GCHandle.Alloc(result, GCHandleType.Pinned); 176 m_pinnedVertexes = GCHandle.Alloc(result, GCHandleType.Pinned);
177 // Inform the garbage collector of this unmanaged allocation so it can schedule
178 // the next GC round more intelligently
179 GC.AddMemoryPressure(Buffer.ByteLength(result));
177 180
178 return result; 181 return result;
179 } 182 }
@@ -223,6 +226,9 @@ namespace OpenSim.Region.Physics.Meshing
223 226
224 int[] result = getIndexListAsInt(); 227 int[] result = getIndexListAsInt();
225 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned); 228 m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned);
229 // Inform the garbage collector of this unmanaged allocation so it can schedule
230 // the next GC round more intelligently
231 GC.AddMemoryPressure(Buffer.ByteLength(result));
226 232
227 return result; 233 return result;
228 } 234 }