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;
}