aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2009-12-14 00:32:00 +0000
committerMelanie2009-12-14 00:32:00 +0000
commit0813dc8c1d8ff6a2de04dc48e991e803eb3df260 (patch)
tree3aa288c205e41277ef927eac8605dc70845d8065 /OpenSim/Region/ScriptEngine
parentAdd an option to exit an instance rather than restarting a region within it (diff)
parentTweaking the ModifyLand packet to be async. Advice from Adam (diff)
downloadopensim-SC_OLD-0813dc8c1d8ff6a2de04dc48e991e803eb3df260.zip
opensim-SC_OLD-0813dc8c1d8ff6a2de04dc48e991e803eb3df260.tar.gz
opensim-SC_OLD-0813dc8c1d8ff6a2de04dc48e991e803eb3df260.tar.bz2
opensim-SC_OLD-0813dc8c1d8ff6a2de04dc48e991e803eb3df260.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs10
3 files changed, 25 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..1b7db7c 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, "osGetSimulatorMemory");
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}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 0b0dc00..580c354 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -163,5 +163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
163 key osGetMapTexture(); 163 key osGetMapTexture();
164 key osGetRegionMapTexture(string regionName); 164 key osGetRegionMapTexture(string regionName);
165 LSL_List osGetRegionStats(); 165 LSL_List osGetRegionStats();
166
167 int osGetSimulatorMemory();
166 } 168 }
167} 169}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 519463e..2876ad6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -637,5 +637,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
637 { 637 {
638 return m_OSSL_Functions.osGetRegionStats(); 638 return m_OSSL_Functions.osGetRegionStats();
639 } 639 }
640
641 /// <summary>
642 /// Returns the amount of memory in use by the Simulator Daemon.
643 /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware)
644 /// </summary>
645 /// <returns></returns>
646 public LSL_Integer osGetSimulatorMemory()
647 {
648 return m_OSSL_Functions.osGetSimulatorMemory();
649 }
640 } 650 }
641} 651}