Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Monitor_Control / Memory_Usage_Monitor.h
blob064b5e74e2df7691811e5927bbf37de5ebdf4c6f
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Memory_Usage_Monitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
8 */
9 //=============================================================================
11 #ifndef MEMORY_USAGE_MONITOR_H
12 #define MEMORY_USAGE_MONITOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/Monitor_Base.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
24 #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H)
25 #include "ace/Monitor_Control/Windows_Monitor.h"
26 #elif defined (ACE_HAS_LINUX_SYSINFO)
27 #include "ace/os_include/sys/os_sysinfo.h"
28 #endif
30 #include "ace/Monitor_Control/Monitor_Control_export.h"
32 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
34 namespace ACE
36 namespace Monitor_Control
38 /**
39 * @class Memory_Usage_Monitor
41 * @brief Monitor percentage of total available memory used.
43 class MONITOR_CONTROL_Export Memory_Usage_Monitor
44 : public Monitor_Base
45 #if defined (ACE_HAS_WIN32_PDH)
46 , public Windows_Monitor
47 #endif
49 public:
50 Memory_Usage_Monitor (const char* name);
52 /// Implementation of the pure virtual method.
53 virtual void update ();
55 /// Stores the default name, used if none is supplied by the user.
56 static const char* default_name ();
58 private:
59 /// Overridden reset, calls platform-specific reset.
60 virtual void clear_i ();
62 private:
63 static const char* default_name_;
65 #if defined (ACE_HAS_LINUX_SYSINFO)
66 struct sysinfo sysinfo_;
67 #endif
72 ACE_END_VERSIONED_NAMESPACE_DECL
74 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
76 #include /**/ "ace/post.h"
78 #endif // MEMORY_USAGE_MONITOR_H