summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.h
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-07-29 13:32:51 -0400
committerDebi King (Dessie) <dessie@lindenlab.com>2011-07-29 13:32:51 -0400
commitfb9f092972c915ff77b3866dae302e3433b46224 (patch)
tree03d970b890a2cd6a4f10e5d90e01fe8ed66ce3b1 /indra/llcommon/llsys.h
parentad96a4ef4706ae39d259281dd993a52034946425 (diff)
parent0e3cea49aaba7fb9e4a75c4a76779ba9273549bf (diff)
reconciled .hgtags
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;
};