mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -1973,5 +1973,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int osGetSimulatorMemory()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory");
|
||||
m_host.AddScriptLPS(1);
|
||||
long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;
|
||||
|
||||
if (pws > Int32.MaxValue)
|
||||
return Int32.MaxValue;
|
||||
if (pws < 0)
|
||||
return 0;
|
||||
|
||||
return (int)pws;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user