* Applied Grumly57 patch for #781; Thanks, Grumly!
parent
0b7626b630
commit
9c428d9935
|
@ -173,15 +173,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
{
|
{
|
||||||
// Remove from internal list
|
// Remove from internal list
|
||||||
appDomains.Remove(ads);
|
appDomains.Remove(ads);
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
Console.WriteLine("Found empty AppDomain, unloading");
|
//Console.WriteLine("Found empty AppDomain, unloading");
|
||||||
long m = GC.GetTotalMemory(true);
|
//long m = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
|
||||||
#endif
|
//#endif
|
||||||
// Unload
|
// Unload
|
||||||
AppDomain.Unload(ads.CurrentAppDomain);
|
AppDomain.Unload(ads.CurrentAppDomain);
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory");
|
//m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory");
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,17 +75,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
// Compile (We assume LSL)
|
// Compile (We assume LSL)
|
||||||
ScriptSource = LSLCompiler.PerformScriptCompile(Script);
|
ScriptSource = LSLCompiler.PerformScriptCompile(Script);
|
||||||
|
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
long before;
|
//long before;
|
||||||
before = GC.GetTotalMemory(true);
|
//before = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
IScript CompiledScript;
|
IScript CompiledScript;
|
||||||
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
|
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
|
||||||
|
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
m_scriptEngine.Log.DebugFormat("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
|
//m_scriptEngine.Log.DebugFormat("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
CompiledScript.Source = Script;
|
CompiledScript.Source = Script;
|
||||||
// Add it to our script memstruct
|
// Add it to our script memstruct
|
||||||
|
|
|
@ -70,17 +70,17 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine
|
||||||
// Compile (We assume LSL)
|
// Compile (We assume LSL)
|
||||||
//ScriptSource = LSLCompiler.CompileFromLSLText(Script);
|
//ScriptSource = LSLCompiler.CompileFromLSLText(Script);
|
||||||
|
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
long before;
|
//long before;
|
||||||
before = GC.GetTotalMemory(true);
|
//before = GC.GetTotalMemory(true); // This force a garbage collect that freezes some windows plateforms
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
IScript CompiledScript;
|
IScript CompiledScript;
|
||||||
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
|
CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource);
|
||||||
|
|
||||||
#if DEBUG
|
//#if DEBUG
|
||||||
Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
|
//Console.WriteLine("Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before);
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
CompiledScript.Source = ScriptSource;
|
CompiledScript.Source = ScriptSource;
|
||||||
// Add it to our script memstruct
|
// Add it to our script memstruct
|
||||||
|
|
Loading…
Reference in New Issue