File: stats.h

package info (click to toggle)
njamd 0.9.3pre2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,704 kB
  • ctags: 1,056
  • sloc: ansic: 9,367; sh: 7,921; makefile: 121; perl: 52
file content (38 lines) | stat: -rw-r--r-- 1,310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#include <sys/types.h>

#ifdef _THREAD_SAFE
# include <pthread.h>
#endif

struct nj_stats_light
{
	u_int total_user;	  /**< Total user memory ever requested */
	u_int total_faulted;  /**< Total memory faulted by system (pages present) */
	u_int peak_user;  	  /**< Peak user mem */
	u_int peak_faulted;   /**< Peak faulted mem */
	u_int peak_overhead;  /**< Peak overhead due to NJAMD */
	u_int total_allocs;   /**< Total number of allocation requests */
	u_int leaked_allocs;  /**< Total number of leaked allocs */
	u_long as_used;		  /**< Total amount of address space used */
};

/** Memory statistics data structure */
struct nj_stats
{
	u_int total_user;	  /**< Total user memory ever requested */
	u_int total_faulted;  /**< Total memory faulted by system (pages present) */
	u_int peak_user;  	  /**< Peak user mem */
	u_int peak_faulted;   /**< Peak faulted mem */
	u_int peak_overhead;  /**< Peak overhead due to NJAMD */
	u_int total_allocs;   /**< Total number of allocation requests */
	u_int leaked_allocs;  /**< Total number of leaked allocs */
	u_long as_used;		  /**< Total amount of address space used */
	u_int leaked_user;    /**< Leaked user memory */
	u_int leaked_faulted; /**< leaked memory faulted by system */
#ifdef _THREAD_SAFE
	pthead_mutex_t lock;  /**< Mutex lock */
#endif
};