SURFEX v8.1
General documentation of Surfex
Surfex_Git2
src
LIB
XRD44
utilities
getpag.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
5
#if defined(CRAY) && !defined(SV2)
6
#define getpag GETPAG
7
#else
8
#define getpag getpag_
9
#endif
10
11
#if defined(RS6K) || defined(SV2)
12
#include <sys/resource.h>
13
long
long
int
14
getpag
()
15
{
16
#if defined(__64BIT__)
17
struct
rusage64 r;
18
long
long
int
rc = getrusage64(RUSAGE_SELF, &r);
19
#else
20
struct
rusage r;
21
long
long
int
rc = getrusage(RUSAGE_SELF, &r);
22
#endif
23
rc = (rc == 0) ? (
long
long
int
) r.ru_majflt : 0;
24
return
rc;
25
}
26
27
#else
28
29
30
long
long
int
getpag
()
31
{
32
return
0L;
33
}
34
35
#endif
36
getpag
long long int getpag()
Definition:
getpag.c:14
Generated on Tue Jan 16 2018 16:23:22 for SURFEX v8.1 by
1.8.13