* Applied Grumly57 patch for #781; Thanks, Grumly!

0.6.0-stable
lbsa71 2008-03-18 13:39:29 +00:00
parent 0b7626b630
commit 9c428d9935
3 changed files with 21 additions and 21 deletions

View File

@ -173,15 +173,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
// Remove from internal list
appDomains.Remove(ads);
#if DEBUG
Console.WriteLine("Found empty AppDomain, unloading");
long m = GC.GetTotalMemory(true);
#endif
//#if DEBUG
//Console.WriteLine("Found empty AppDomain, unloading");
//long m = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
//#endif
// Unload
AppDomain.Unload(ads.CurrentAppDomain);
#if DEBUG
m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory");
#endif
//#if DEBUG
//m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory");
//#endif
}
}
}

View File

@ -75,17 +75,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
// Compile (We assume LSL)
ScriptSource = LSLCompiler.PerformScriptCompile(Script);
#if DEBUG
long before;
before = GC.GetTotalMemory(true);
#endif
//#if DEBUG
//long before;
//before = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
//#endif
IScript CompiledScript;
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
#if DEBUG
m_scriptEngine.Log.DebugFormat("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
#endif
//#if DEBUG
//m_scriptEngine.Log.DebugFormat("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
//#endif
CompiledScript.Source = Script;
// Add it to our script memstruct

View File

@ -70,17 +70,17 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine
// Compile (We assume LSL)
//ScriptSource = LSLCompiler.CompileFromLSLText(Script);
#if DEBUG
long before;
before = GC.GetTotalMemory(true);
#endif
//#if DEBUG
//long before;
//before = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
//#endif
IScript CompiledScript;
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
#if DEBUG
Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
#endif
//#if DEBUG
//Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
//#endif
CompiledScript.Source = ScriptSource;
// Add it to our script memstruct