aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs16
1 files changed, 16 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 79367fb..ba07f9c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3591,6 +3591,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3591 return (int)pws; 3591 return (int)pws;
3592 } 3592 }
3593 3593
3594 public int osGetSimulatorMemoryKB()
3595 {
3596 CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory");
3597
3598 long pws = System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;
3599
3600 if((pws & 0x3FFL) != 0)
3601 pws += 0x400L;
3602 pws >>= 10;
3603
3604 if (pws > Int32.MaxValue)
3605 return Int32.MaxValue;
3606
3607 return (int)pws;
3608 }
3609
3594 public void osSetSpeed(string UUID, LSL_Float SpeedModifier) 3610 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
3595 { 3611 {
3596 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 3612 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");