summaryrefslogtreecommitdiffstats
path: root/SystemInformation.hxx.in
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2012-10-16 21:12:23 (GMT)
committerBrad King <brad.king@kitware.com>2012-10-31 20:43:34 (GMT)
commit7ae44db4b9a1b3b26f2d670135fc00324e24f348 (patch)
treec4ce9f6df920f1b4e947376d01cb4f0e03fe7829 /SystemInformation.hxx.in
parent5d0de36d2b2f420ab58841bbcd47c45fcdc4486e (diff)
downloadCMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.zip
CMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.tar.gz
CMake-7ae44db4b9a1b3b26f2d670135fc00324e24f348.tar.bz2
KWSys 2012-10-16 (b7a97ac3)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ b7a97ac3 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' bab53989..b7a97ac3 Brad King (3): f9db7eab SystemInformation: Fix helper definition order a1e83e42 SystemInformation: Expose helper functions only where needed b7a97ac3 SystemInformation: Drop unused LoadLines on OS X Burlen Loring (1): 6072e63b SystemInformation: support for resource limits Sean McBride (2): a536d833 ProcessUNIX: Suppress warning about uninteresting return code 00852081 SystemInformation: Fix sloppy use of sysctlbyname() API Change-Id: Iae8af129a021435ef4e6daef255e312c99d7b773
Diffstat (limited to 'SystemInformation.hxx.in')
-rw-r--r--SystemInformation.hxx.in49
1 files changed, 39 insertions, 10 deletions
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index cb6c759..8f4cb4e 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -24,7 +24,6 @@
namespace @KWSYS_NAMESPACE@
{
-
// forward declare the implementation class
class SystemInformationImplementation;
@@ -96,15 +95,44 @@ public:
size_t GetTotalPhysicalMemory();
size_t GetAvailablePhysicalMemory();
- // returns an informative general description if the ram
- // on this system
- kwsys_stl::string GetMemoryDescription();
-
- // Retrieve physical memory information in kib
- LongLong GetMemoryTotal();
- LongLong GetMemoryUsed();
-
- // enable/disable stack trace signal handler.
+ // returns an informative general description if the installed and
+ // available ram on this system. See the GetHostMmeoryTotal, and
+ // Get{Host,Proc}MemoryAvailable methods for more information.
+ kwsys_stl::string GetMemoryDescription(
+ const char *hostLimitEnvVarName=NULL,
+ const char *procLimitEnvVarName=NULL);
+
+ // Retrieve amount of physical memory installed on the system in KiB
+ // units.
+ LongLong GetHostMemoryTotal();
+
+ // Get total system RAM in units of KiB available colectivley to all
+ // processes in a process group. An example of a process group
+ // are the processes comprising an mpi program which is running in
+ // parallel. The amount of memory reported may differ from the host
+ // total if a host wide resource limit is applied. Such reource limits
+ // are reported to us via an applicaiton specified environment variable.
+ LongLong GetHostMemoryAvailable(const char *hostLimitEnvVarName=NULL);
+
+ // Get total system RAM in units of KiB available to this process.
+ // This may differ from the host available if a per-process resource
+ // limit is applied. per-process memory limits are applied on unix
+ // system via rlimit api. Resource limits that are not imposed via
+ // rlimit api may be reported to us via an application specified
+ // environment variable.
+ LongLong GetProcMemoryAvailable(
+ const char *hostLimitEnvVarName=NULL,
+ const char *procLimitEnvVarName=NULL);
+
+ // Get the system RAM used by all processes on the host, in units of KiB.
+ LongLong GetHostMemoryUsed();
+
+ // Get system RAM used by this process id in units of KiB.
+ LongLong GetProcMemoryUsed();
+
+ // enable/disable stack trace signal handler. In order to
+ // produce an informative stack trace the application should
+ // be dynamically linked and compiled with debug symbols.
static
void SetStackTraceOnError(int enable);
@@ -113,6 +141,7 @@ public:
void RunOSCheck();
void RunMemoryCheck();
};
+
} // namespace @KWSYS_NAMESPACE@
/* Undefine temporary macros. */