summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.h
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-07-19 15:06:56 -0400
committerLogan Dethrow <log@lindenlab.com>2011-07-19 15:06:56 -0400
commit0f501293bdf5498369e5b6e4409cfdc758366d9e (patch)
treee8cd32ff25f2ef00d43a69491a37a3b59f169e85 /indra/llcommon/llsys.h
parent792667ff8ef13e16823d96b490ea9a4f498425ea (diff)
parent4dc0850da7469906e5ad052da71830b05005295b (diff)
merge
Diffstat (limited to 'indra/llcommon/llsys.h')
-rw-r--r--indra/llcommon/llsys.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h
index 41a4f25000..739e795d3a 100644
--- a/indra/llcommon/llsys.h
+++ b/indra/llcommon/llsys.h
@@ -36,6 +36,7 @@
// llinfos << info << llendl;
//
+#include "llsd.h"
#include <iosfwd>
#include <string>
@@ -117,6 +118,27 @@ public:
//get the available memory infomation in KiloBytes.
static void getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb);
+
+ // Retrieve a map of memory statistics. The keys of the map are platform-
+ // dependent. The values are in kilobytes to try to avoid integer overflow.
+ LLSD getStatsMap() const;
+
+ // Re-fetch memory data (as reported by stream() and getStatsMap()) from the
+ // system. Normally this is fetched at construction time. Return (*this)
+ // to permit usage of the form:
+ // @code
+ // LLMemoryInfo info;
+ // ...
+ // info.refresh().getStatsMap();
+ // @endcode
+ LLMemoryInfo& refresh();
+
+private:
+ // set mStatsMap
+ static LLSD loadStatsMap();
+
+ // Memory stats for getStatsMap().
+ LLSD mStatsMap;
};