Add process working memory to "show stats" memory statistics.
This shows the actual amount of RAM being taken up by OpenSimulator (objects + vm overhead)0.7.3-post-fixes
parent
4e5f823595
commit
20b0fda3bb
|
@ -26,8 +26,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
|
@ -46,8 +46,12 @@ namespace OpenSim.Framework.Statistics
|
||||||
sb.Append(Environment.NewLine);
|
sb.Append(Environment.NewLine);
|
||||||
sb.Append(
|
sb.Append(
|
||||||
string.Format(
|
string.Format(
|
||||||
"Allocated to OpenSim : {0} MB" + Environment.NewLine,
|
"Allocated to OpenSim objects: {0} MB\n",
|
||||||
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
|
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
|
||||||
|
sb.Append(
|
||||||
|
string.Format(
|
||||||
|
"Process memory : {0} MB\n",
|
||||||
|
Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0)));
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,12 +81,15 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
private static uint nextXferID = 5000;
|
private static uint nextXferID = 5000;
|
||||||
private static Random randomClass = new Random();
|
private static Random randomClass = new Random();
|
||||||
|
|
||||||
// Get a list of invalid file characters (OS dependent)
|
// Get a list of invalid file characters (OS dependent)
|
||||||
private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]";
|
private static string regexInvalidFileChars = "[" + new String(Path.GetInvalidFileNameChars()) + "]";
|
||||||
private static string regexInvalidPathChars = "[" + new String(Path.GetInvalidPathChars()) + "]";
|
private static string regexInvalidPathChars = "[" + new String(Path.GetInvalidPathChars()) + "]";
|
||||||
private static object XferLock = new object();
|
private static object XferLock = new object();
|
||||||
/// <summary>Thread pool used for Util.FireAndForget if
|
|
||||||
/// FireAndForgetMethod.SmartThreadPool is used</summary>
|
/// <summary>
|
||||||
|
/// Thread pool used for Util.FireAndForget if FireAndForgetMethod.SmartThreadPool is used
|
||||||
|
/// </summary>
|
||||||
private static SmartThreadPool m_ThreadPool;
|
private static SmartThreadPool m_ThreadPool;
|
||||||
|
|
||||||
// Unix-epoch starts at January 1st 1970, 00:00:00 UTC. And all our times in the server are (or at least should be) in UTC.
|
// Unix-epoch starts at January 1st 1970, 00:00:00 UTC. And all our times in the server are (or at least should be) in UTC.
|
||||||
|
|
Loading…
Reference in New Issue