Merge branch 'ubitwork' into avination
commit
b3910a44fa
|
@ -63,12 +63,15 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
internal void Clear()
|
internal void Clear()
|
||||||
{
|
{
|
||||||
this.value = default(T);
|
|
||||||
if (this.handle != null)
|
if (this.handle != null)
|
||||||
{
|
|
||||||
this.handle.Clear();
|
this.handle.Clear();
|
||||||
this.handle = null;
|
ClearRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal void ClearRef()
|
||||||
|
{
|
||||||
|
this.value = default(T);
|
||||||
|
this.handle = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +288,7 @@ namespace OpenSim.Framework
|
||||||
if (--this.size > 0 && index != this.size)
|
if (--this.size > 0 && index != this.size)
|
||||||
{
|
{
|
||||||
Set(this.items[this.size], index);
|
Set(this.items[this.size], index);
|
||||||
|
this.items[this.size].ClearRef();
|
||||||
if (!BubbleUp(index))
|
if (!BubbleUp(index))
|
||||||
BubbleDown(index);
|
BubbleDown(index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,26 @@ namespace OpenSim.Framework.Statistics
|
||||||
string.Format(
|
string.Format(
|
||||||
"Allocated to OpenSim objects: {0} MB\n",
|
"Allocated to OpenSim objects: {0} MB\n",
|
||||||
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
|
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
|
||||||
|
|
||||||
|
Process myprocess = Process.GetCurrentProcess();
|
||||||
|
if (!myprocess.HasExited)
|
||||||
|
{
|
||||||
|
myprocess.Refresh();
|
||||||
sb.Append(
|
sb.Append(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Process memory : {0} MB\n",
|
"Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||||
Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0)));
|
Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0),
|
||||||
|
Math.Round(Process.GetCurrentProcess().PagedMemorySize64 / 1024.0 / 1024.0),
|
||||||
|
Math.Round(Process.GetCurrentProcess().VirtualMemorySize64 / 1024.0 / 1024.0)));
|
||||||
|
sb.Append(
|
||||||
|
string.Format(
|
||||||
|
"Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||||
|
Math.Round(Process.GetCurrentProcess().PeakWorkingSet64 / 1024.0 / 1024.0),
|
||||||
|
Math.Round(Process.GetCurrentProcess().PeakPagedMemorySize64 / 1024.0 / 1024.0),
|
||||||
|
Math.Round(Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024.0 / 1024.0)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sb.Append("Process reported as Exited \n");
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1820,6 +1820,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
parentGroup.LinkToGroup(child);
|
parentGroup.LinkToGroup(child);
|
||||||
|
|
||||||
|
child.DetachFromBackup();
|
||||||
|
|
||||||
// this is here so physics gets updated!
|
// this is here so physics gets updated!
|
||||||
// Don't remove! Bad juju! Stay away! or fix physics!
|
// Don't remove! Bad juju! Stay away! or fix physics!
|
||||||
child.AbsolutePosition = child.AbsolutePosition;
|
child.AbsolutePosition = child.AbsolutePosition;
|
||||||
|
|
|
@ -596,7 +596,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
if (!m_Enabled)
|
if (!m_Enabled)
|
||||||
return;
|
return;
|
||||||
lockScriptsForRead(true);
|
lockScriptsForRead(true);
|
||||||
foreach (IScriptInstance instance in m_Scripts.Values)
|
|
||||||
|
List<IScriptInstance> instancesToDel = new List<IScriptInstance>(m_Scripts.Values);
|
||||||
|
|
||||||
|
// foreach (IScriptInstance instance in m_Scripts.Values)
|
||||||
|
foreach (IScriptInstance instance in instancesToDel)
|
||||||
{
|
{
|
||||||
// Force a final state save
|
// Force a final state save
|
||||||
//
|
//
|
||||||
|
@ -619,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
// Must be done explicitly because they have infinite
|
// Must be done explicitly because they have infinite
|
||||||
// lifetime
|
// lifetime
|
||||||
//
|
//
|
||||||
if (!m_SimulatorShuttingDown)
|
// if (!m_SimulatorShuttingDown)
|
||||||
{
|
{
|
||||||
m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
|
m_DomainScripts[instance.AppDomain].Remove(instance.ItemID);
|
||||||
if (m_DomainScripts[instance.AppDomain].Count == 0)
|
if (m_DomainScripts[instance.AppDomain].Count == 0)
|
||||||
|
@ -629,10 +633,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Scripts.Clear();
|
// m_Scripts.Clear();
|
||||||
m_PrimObjects.Clear();
|
// m_PrimObjects.Clear();
|
||||||
m_Assemblies.Clear();
|
// m_Assemblies.Clear();
|
||||||
m_DomainScripts.Clear();
|
// m_DomainScripts.Clear();
|
||||||
}
|
}
|
||||||
lockScriptsForRead(false);
|
lockScriptsForRead(false);
|
||||||
lockScriptsForWrite(true);
|
lockScriptsForWrite(true);
|
||||||
|
|
Loading…
Reference in New Issue