mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
* Implements OSSL function: osGetSimulatorMemory - returns the current amount of memory allocated to the simulator process (Moderate Threat Level).
* Cleans redundant information out of the Simulator Version. Versions now look like: "OpenSimulator 0.6.9(dev) Unix/Mono" * [Minor] additional log info for MySQLInventoryData
This commit is contained in:
@@ -1970,5 +1970,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int osGetSimulatorMemory()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
|
||||
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