mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
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
This commit is contained in:
@@ -1107,6 +1107,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
if (loginsdisabled && (m_frame > 20))
|
||||
{
|
||||
// In 99.9% of cases it is a bad idea to manually force garbage collection. However,
|
||||
// this is a rare case where we know we have just went through a long cycle of heap
|
||||
// allocations, and there is no more work to be done until someone logs in
|
||||
GC.Collect();
|
||||
|
||||
m_log.Debug("[REGION]: Enabling Logins");
|
||||
loginsdisabled = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user