source: git/omalloc/omStats.h @ 79a3ee

spielwiese
Last change on this file since 79a3ee was 79a3ee, checked in by Hans Schoenemann <hannes@…>, 8 years ago
fix: count omalloc-internal small blocks from malloc
  • Property mode set to 100644
File size: 2.3 KB
Line 
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
10struct 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 InternalUsedBytesMalloc;
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 */
37extern struct omInfo_s omGetInfo();
38/* the struct itself which is always up-to-date */
39/* use read-only */
40extern struct omInfo_s om_Info;
41/* update the global info struct */
42extern void omUpdateInfo();
43/* initialize such that sbrk can be measured */
44extern void omInitInfo();
45extern void omPrintStats(FILE* fd);
46extern void omPrintInfo(FILE* fd);
47
48/*BEGINPRIVATE*/
49/* used internally to keep track of sbrk */
50extern unsigned long om_SbrkInit;
51/*ENDPRIVATE*/
52#endif /* OM_STATS_H */
Note: See TracBrowser for help on using the repository browser.