aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-26 15:52:59 -0700
committerJohn Hurliman2009-10-26 15:52:59 -0700
commit119cf80e13e9fccea30147e3274f5d44958248b2 (patch)
tree4eddb70be6dc92ea7a8de05140d03c8b8529e13b /OpenSim/Region/Framework/Scenes/Scene.cs
parentNo need to create dupe TriMeshData for ODE. A previous patch created a dictio... (diff)
downloadopensim-SC-119cf80e13e9fccea30147e3274f5d44958248b2.zip
opensim-SC-119cf80e13e9fccea30147e3274f5d44958248b2.tar.gz
opensim-SC-119cf80e13e9fccea30147e3274f5d44958248b2.tar.bz2
opensim-SC-119cf80e13e9fccea30147e3274f5d44958248b2.tar.xz
Added calls to GC.AddMemoryPressure() when unmanaged memory is allocated for ODE (helps the GC make better scheduling choices), and a call to GC.Collect() right before logins are enabled for a region. Although this doesn't change actual memory usage, it improves the reported usage from OpenSim and the operating system
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
1 files changed, 5 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 }