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 */
22  long AvailBytesMalloc; /* set in omUpdateInfo(), needs malloc support */
23  long MaxBytesFromMalloc; /* always kept up-to-date */
24  long CurrentBytesFromMalloc; /* always kept up-to-date */
25  long MaxBytesFromValloc; /* always kept up-to-date */
26  long CurrentBytesFromValloc; /* always kept up-to-date */
27  long UsedBytesFromValloc; /* set in omUpdateInfo() */
28  long AvailBytesFromValloc;/* set in omUpdateInfo() */
29  long MaxPages; /* always kept up-to-date */
30  long UsedPages; /* always kept up-to-date */
31  long AvailPages; /* always kept up-to-date */
32  long MaxRegionsAlloc; /* always kept up-to-date */
33  long CurrentRegionsAlloc; /* always kept up-to-date */
34 };
35 
36 /* returns a copy of omallinfo struct */
37 extern struct omInfo_s omGetInfo();
38 /* the struct itself which is always up-to-date */
39 /* use read-only */
40 extern struct omInfo_s om_Info;
41 /* update the global info struct */
42 extern void omUpdateInfo();
43 /* initialize such that sbrk can be measured */
44 extern void omInitInfo();
45 extern void omPrintStats(FILE* fd);
46 extern void omPrintInfo(FILE* fd);
47 
48 /*BEGINPRIVATE*/
49 /* used internally to keep track of sbrk */
50 extern unsigned long om_SbrkInit;
51 /*ENDPRIVATE*/
52 #endif /* OM_STATS_H */
long AvailBytesFromValloc
Definition: omStats.h:28
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
long InternalUsedBytesMalloc
Definition: omStats.h:21
struct omInfo_s omGetInfo()
Definition: omStats.c:109
long UsedPages
Definition: omStats.h:30
long CurrentBytesFromValloc
Definition: omStats.h:26
long CurrentBytesFromMalloc
Definition: omStats.h:24
long MaxBytesMmap
Definition: omStats.h:16
void omPrintStats(FILE *fd)
Definition: omStats.c:115
long UsedBytes
Definition: omStats.h:18
void omPrintInfo(FILE *fd)
Definition: omStats.c:129
void omInitInfo()
Definition: omStats.c:17
long CurrentRegionsAlloc
Definition: omStats.h:33
long CurrentBytesSystem
Definition: omStats.h:13
struct omInfo_s om_Info
Definition: omStats.c:13
long MaxRegionsAlloc
Definition: omStats.h:32
unsigned long om_SbrkInit
Definition: omStats.c:15
long MaxBytesFromValloc
Definition: omStats.h:25
long MaxBytesFromMalloc
Definition: omStats.h:23
long MaxPages
Definition: omStats.h:29
void omUpdateInfo()
Definition: omStats.c:24
long CurrentBytesMmap
Definition: omStats.h:17
long AvailBytesMalloc
Definition: omStats.h:22
long AvailPages
Definition: omStats.h:31
long UsedBytesFromValloc
Definition: omStats.h:27
long AvailBytes
Definition: omStats.h:19
long UsedBytesMalloc
Definition: omStats.h:20