diff options
author | Adam Frisby | 2009-12-13 03:04:16 +1100 |
---|---|---|
committer | Adam Frisby | 2009-12-13 03:04:16 +1100 |
commit | 963cf25813ad2bd6dceaa39757391fbf94d6f09e (patch) | |
tree | 80244f3026d0d1c06f4d8e0b496470052353b083 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | * Bugfix mantis 4441, "Use of Autopilot isn't playing any animations." (diff) | |
download | opensim-SC_OLD-963cf25813ad2bd6dceaa39757391fbf94d6f09e.zip opensim-SC_OLD-963cf25813ad2bd6dceaa39757391fbf94d6f09e.tar.gz opensim-SC_OLD-963cf25813ad2bd6dceaa39757391fbf94d6f09e.tar.bz2 opensim-SC_OLD-963cf25813ad2bd6dceaa39757391fbf94d6f09e.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5501679..e9e54ae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1970,5 +1970,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1970 | return ret; | 1970 | return ret; |
1971 | } | 1971 | } |
1972 | 1972 | ||
1973 | public int osGetSimulatorMemory() | ||
1974 | { | ||
1975 | CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); | ||
1976 | m_host.AddScriptLPS(1); | ||
1977 | long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64; | ||
1978 | |||
1979 | if (pws > Int32.MaxValue) | ||
1980 | return Int32.MaxValue; | ||
1981 | if (pws < 0) | ||
1982 | return 0; | ||
1983 | |||
1984 | return (int)pws; | ||
1985 | } | ||
1973 | } | 1986 | } |
1974 | } | 1987 | } |