omStats.h
Go to the documentation of this file.
1 /*******************************************************************
2  * File: omStats.h
3  * Purpose: declaration of statistics related stuff
4  * Author: obachman (Olaf Bachmann)
5  * Created: 11/99
6  *******************************************************************/
7 #ifndef OM_STATS_H
8 #define OM_STATS_H
9 
10 struct omInfo_s
11 {
12  long MaxBytesSystem; /* set in omUpdateInfo(), is more accurate with malloc support */
13  long CurrentBytesSystem; /* set in omUpdateInfo(), is more accurate with malloc support */
14  long MaxBytesSbrk; /* always up-to-date, not very accurate, needs omInintInfo() */
15  long CurrentBytesSbrk; /* set in omUpdateInfo(), needs omInintInfo() */
16  long MaxBytesMmap; /* set in omUpdateInfo(), not very accurate */
17  long CurrentBytesMmap; /* set in omUpdateInfo(), not very accurate */
18  long UsedBytes; /* set in omUpdateInfo() */
19  long AvailBytes; /* set in omUpdateInfo() */
20  long UsedBytesMalloc; /* set in omUpdateInfo(), needs malloc support */
21  long AvailBytesMalloc; /* set in omUpdateInfo(), needs malloc support */
22  long MaxBytesFromMalloc; /* always kept up-to-date */
23  long CurrentBytesFromMalloc; /* always kept up-to-date */
24  long MaxBytesFromValloc; /* always kept up-to-date */
25  long CurrentBytesFromValloc; /* always kept up-to-date */
26  long UsedBytesFromValloc; /* set in omUpdateInfo() */
27  long AvailBytesFromValloc;/* set in omUpdateInfo() */
28  long MaxPages; /* always kept up-to-date */
29  long UsedPages; /* always kept up-to-date */
30  long AvailPages; /* always kept up-to-date */
31  long MaxRegionsAlloc; /* always kept up-to-date */
32  long CurrentRegionsAlloc; /* always kept up-to-date */
33 };
34 
35 /* returns a copy of omallinfo struct */
36 extern struct omInfo_s omGetInfo();
37 /* the struct itself which is always up-to-date */
38 /* use read-only */
39 extern struct omInfo_s om_Info;
40 /* update the global info struct */
41 extern void omUpdateInfo();
42 /* initialize such that sbrk can be measured */
43 extern void omInitInfo();
44 extern void omPrintStats(FILE* fd);
45 extern void omPrintInfo(FILE* fd);
46 
47 /*BEGINPRIVATE*/
48 /* used internally to keep track of sbrk */
49 extern unsigned long om_SbrkInit;
50 /*ENDPRIVATE*/
51 #endif /* OM_STATS_H */
long AvailBytesFromValloc
Definition: omStats.h:27
int status int fd
Definition: si_signals.h:59
long CurrentBytesSbrk
Definition: omStats.h:15
long MaxBytesSystem
Definition: omStats.h:12
long MaxBytesSbrk
Definition: omStats.h:14
struct omInfo_s omGetInfo()
Definition: omStats.c:108
long UsedPages
Definition: omStats.h:29
long CurrentBytesFromValloc
Definition: omStats.h:25
long CurrentBytesFromMalloc
Definition: omStats.h:23
long MaxBytesMmap
Definition: omStats.h:16
void omPrintStats(FILE *fd)
Definition: omStats.c:114
long UsedBytes
Definition: omStats.h:18
void omPrintInfo(FILE *fd)
Definition: omStats.c:127
void omInitInfo()
Definition: omStats.c:17
long CurrentRegionsAlloc
Definition: omStats.h:32
long CurrentBytesSystem
Definition: omStats.h:13
struct omInfo_s om_Info
Definition: omStats.c:13
long MaxRegionsAlloc
Definition: omStats.h:31
unsigned long om_SbrkInit
Definition: omStats.c:15
long MaxBytesFromValloc
Definition: omStats.h:24
long MaxBytesFromMalloc
Definition: omStats.h:22
long MaxPages
Definition: omStats.h:28
void omUpdateInfo()
Definition: omStats.c:24
long CurrentBytesMmap
Definition: omStats.h:17
long AvailBytesMalloc
Definition: omStats.h:21
long AvailPages
Definition: omStats.h:30
long UsedBytesFromValloc
Definition: omStats.h:26
long AvailBytes
Definition: omStats.h:19
long UsedBytesMalloc
Definition: omStats.h:20