|
BOSS 8.0.0
BESIII Offline Software System
|
#include "memwatch.h"#include <limits.h>#include <setjmp.h>#include <signal.h>#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <ctype.h>Go to the source code of this file.
Classes | |
| struct | mwData_ |
| struct | mwStat_ |
| struct | mwGrabData_ |
| struct | mwMarker_ |
Macros | |
| #define | __MEMWATCH_C 1 |
| #define | VERSION "2.71" /* the current version number */ |
| #define | CHKVAL(mw) |
| #define | FLUSH() |
| #define | TESTS(f, l) |
| #define | PRECHK 0x01234567L |
| #define | POSTCHK 0x76543210L |
| #define | mwBUFFER_TO_MW(p) |
| #define | MW_NML 0x0001 |
| #define | COMMIT "" /* Normal ANSI */ |
| #define | CPPTEXT "" |
| #define | mwSTDERR mwLog |
| #define | MW_MUTEX_INIT() |
| #define | MW_MUTEX_TERM() |
| #define | MW_MUTEX_LOCK() |
| #define | MW_MUTEX_UNLOCK() |
| #define | mw16BIT 1 |
| #define | mwROUNDALLOC_DEFAULT 2 |
| #define | mwROUNDALLOC mwROUNDALLOC_DEFAULT |
| #define | AIPH() |
Typedefs | |
| typedef struct mwData_ | mwData |
| typedef struct mwStat_ | mwStat |
| typedef struct mwGrabData_ | mwGrabData |
| typedef struct mwMarker_ | mwMarker |
Functions | |
| void | mwInit (void) |
| void | mwAbort (void) |
| void | mwTerm (void) |
| void | mwStatistics (int level) |
| void | mwAutoCheck (int onoff) |
| void | mwSetOutFunc (void(*func)(int)) |
| int | mwTest (const char *file, int line, int items) |
| int | mwTestBuffer (const char *file, int line, void *p) |
| void | mwBreakOut (const char *cause) |
| void * | mwMark (void *p, const char *desc, const char *file, unsigned line) |
| void * | mwUnmark (void *p, const char *file, unsigned line) |
| int | mwAriHandler (const char *estr) |
| void | mwSetAriFunc (int(*func)(const char *)) |
| void * | mwMalloc (size_t size, const char *file, int line) |
| void * | mwRealloc (void *p, size_t size, const char *file, int line) |
| char * | mwStrdup (const char *str, const char *file, int line) |
| void | mwFree (void *p, const char *file, int line) |
| void * | mwCalloc (size_t a, size_t b, const char *file, int line) |
| void | mwFree_ (void *p) |
| void * | mwMalloc_ (size_t size) |
| void * | mwRealloc_ (void *p, size_t size) |
| void * | mwCalloc_ (size_t a, size_t b) |
| void | mwFlushNow (void) |
| void | mwDoFlush (int onoff) |
| void | mwLimit (long lim) |
| void | mwSetAriAction (int action) |
| int | mwAssert (int exp, const char *exps, const char *fn, int ln) |
| int | mwVerify (int exp, const char *exps, const char *fn, int ln) |
| void | mwTrace (const char *format,...) |
| unsigned | mwGrab (unsigned kb) |
| unsigned | mwDrop (unsigned kb) |
| void | mwNoMansLand (int level) |
| int | mwIsReadAddr (const void *p, unsigned len) |
| int | mwIsSafeAddr (void *p, unsigned len) |
| #define __MEMWATCH_C 1 |
Definition at line 98 of file KalFitMemLeak.c.
| #define AIPH | ( | ) |
Definition at line 2267 of file KalFitMemLeak.c.
| #define CHKVAL | ( | mw | ) |
Definition at line 141 of file KalFitMemLeak.c.
Referenced by mwMalloc().
| #define COMMIT "" /* Normal ANSI */ |
Definition at line 156 of file KalFitMemLeak.c.
| #define CPPTEXT "" |
Definition at line 162 of file KalFitMemLeak.c.
Referenced by mwInit().
| #define FLUSH | ( | ) |
Definition at line 142 of file KalFitMemLeak.c.
Referenced by mwAbort(), mwAssert(), mwFree(), mwInit(), mwLimit(), mwMalloc(), mwRealloc(), mwStrdup(), mwTrace(), and mwVerify().
| #define mw16BIT 1 |
Definition at line 203 of file KalFitMemLeak.c.
| #define MW_MUTEX_INIT | ( | ) |
Definition at line 177 of file KalFitMemLeak.c.
Referenced by mwInit().
| #define MW_MUTEX_LOCK | ( | ) |
Definition at line 179 of file KalFitMemLeak.c.
Referenced by mwAssert(), mwCalloc_(), mwFree(), mwFree_(), mwMalloc(), mwMalloc_(), mwRealloc(), mwRealloc_(), mwSetAriAction(), mwStrdup(), mwTrace(), and mwVerify().
| #define MW_MUTEX_TERM | ( | ) |
Definition at line 178 of file KalFitMemLeak.c.
Referenced by mwAbort().
| #define MW_MUTEX_UNLOCK | ( | ) |
Definition at line 180 of file KalFitMemLeak.c.
Referenced by mwAssert(), mwCalloc_(), mwFree(), mwFree_(), mwMalloc(), mwMalloc_(), mwRealloc(), mwRealloc_(), mwSetAriAction(), mwStrdup(), mwTrace(), and mwVerify().
| #define MW_NML 0x0001 |
Definition at line 151 of file KalFitMemLeak.c.
Referenced by mwAbort(), mwFree(), and mwRealloc().
| #define mwBUFFER_TO_MW | ( | p | ) |
Definition at line 147 of file KalFitMemLeak.c.
Referenced by mwFree(), mwRealloc(), and mwTestBuffer().
| #define mwROUNDALLOC mwROUNDALLOC_DEFAULT |
Definition at line 221 of file KalFitMemLeak.c.
| #define mwROUNDALLOC_DEFAULT 2 |
Definition at line 204 of file KalFitMemLeak.c.
| #define mwSTDERR mwLog |
Definition at line 168 of file KalFitMemLeak.c.
Referenced by mwAbort(), mwAssert(), mwBreakOut(), and mwVerify().
| #define POSTCHK 0x76543210L |
Definition at line 146 of file KalFitMemLeak.c.
| #define PRECHK 0x01234567L |
Definition at line 145 of file KalFitMemLeak.c.
| #define TESTS | ( | f, | |
| l ) |
Definition at line 143 of file KalFitMemLeak.c.
Referenced by mwAssert(), mwCalloc_(), mwDrop(), mwFree(), mwFree_(), mwGrab(), mwLimit(), mwMalloc(), mwMalloc_(), mwMark(), mwNoMansLand(), mwRealloc(), mwRealloc_(), mwSetAriAction(), mwTrace(), and mwVerify().
| #define VERSION "2.71" /* the current version number */ |
Definition at line 140 of file KalFitMemLeak.c.
Referenced by mwInit().
Definition at line 258 of file KalFitMemLeak.c.
| typedef struct mwGrabData_ mwGrabData |
Definition at line 286 of file KalFitMemLeak.c.
Definition at line 293 of file KalFitMemLeak.c.
Definition at line 274 of file KalFitMemLeak.c.
| void mwAbort | ( | void | ) |
Definition at line 524 of file KalFitMemLeak.c.
| int mwAriHandler | ( | const char * | estr | ) |
Definition at line 869 of file KalFitMemLeak.c.
| int mwAssert | ( | int | exp, |
| const char * | exps, | ||
| const char * | fn, | ||
| int | ln ) |
Definition at line 1266 of file KalFitMemLeak.c.
| void mwAutoCheck | ( | int | onoff | ) |
Definition at line 662 of file KalFitMemLeak.c.
| void mwBreakOut | ( | const char * | cause | ) |
Definition at line 714 of file KalFitMemLeak.c.
| void * mwCalloc | ( | size_t | a, |
| size_t | b, | ||
| const char * | file, | ||
| int | line ) |
Definition at line 1189 of file KalFitMemLeak.c.
| void * mwCalloc_ | ( | size_t | a, |
| size_t | b ) |
Definition at line 1219 of file KalFitMemLeak.c.
| void mwDoFlush | ( | int | onoff | ) |
Definition at line 1231 of file KalFitMemLeak.c.
| unsigned mwDrop | ( | unsigned | kb | ) |
Definition at line 1425 of file KalFitMemLeak.c.
| void mwFlushNow | ( | void | ) |
Definition at line 1226 of file KalFitMemLeak.c.
| void mwFree | ( | void * | p, |
| const char * | file, | ||
| int | line ) |
Definition at line 1081 of file KalFitMemLeak.c.
| void mwFree_ | ( | void * | p | ) |
Definition at line 1198 of file KalFitMemLeak.c.
| unsigned mwGrab | ( | unsigned | kb | ) |
Definition at line 1420 of file KalFitMemLeak.c.
| void mwInit | ( | void | ) |
Definition at line 417 of file KalFitMemLeak.c.
| int mwIsReadAddr | ( | const void * | p, |
| unsigned | len ) |
Definition at line 2617 of file KalFitMemLeak.c.
Referenced by mwMark().
| int mwIsSafeAddr | ( | void * | p, |
| unsigned | len ) |
Definition at line 2622 of file KalFitMemLeak.c.
| void mwLimit | ( | long | lim | ) |
Definition at line 1238 of file KalFitMemLeak.c.
| void * mwMalloc | ( | size_t | size, |
| const char * | file, | ||
| int | line ) |
Definition at line 884 of file KalFitMemLeak.c.
| void * mwMalloc_ | ( | size_t | size | ) |
Definition at line 1205 of file KalFitMemLeak.c.
| void * mwMark | ( | void * | p, |
| const char * | desc, | ||
| const char * | file, | ||
| unsigned | line ) |
Definition at line 723 of file KalFitMemLeak.c.
| void mwNoMansLand | ( | int | level | ) |
Definition at line 1547 of file KalFitMemLeak.c.
| void * mwRealloc | ( | void * | p, |
| size_t | size, | ||
| const char * | file, | ||
| int | line ) |
Definition at line 972 of file KalFitMemLeak.c.
| void * mwRealloc_ | ( | void * | p, |
| size_t | size ) |
Definition at line 1212 of file KalFitMemLeak.c.
| void mwSetAriAction | ( | int | action | ) |
Definition at line 1258 of file KalFitMemLeak.c.
| void mwSetAriFunc | ( | int(* | func )(const char *) | ) |
Definition at line 875 of file KalFitMemLeak.c.
| void mwSetOutFunc | ( | void(* | func )(int) | ) |
Definition at line 668 of file KalFitMemLeak.c.
| void mwStatistics | ( | int | level | ) |
Definition at line 651 of file KalFitMemLeak.c.
| char * mwStrdup | ( | const char * | str, |
| const char * | file, | ||
| int | line ) |
Definition at line 1059 of file KalFitMemLeak.c.
| void mwTerm | ( | void | ) |
Definition at line 641 of file KalFitMemLeak.c.
| int mwTest | ( | const char * | file, |
| int | line, | ||
| int | items ) |
Definition at line 692 of file KalFitMemLeak.c.
| int mwTestBuffer | ( | const char * | file, |
| int | line, | ||
| void * | p ) |
Definition at line 702 of file KalFitMemLeak.c.
| void mwTrace | ( | const char * | format, |
| ... ) |
Definition at line 1388 of file KalFitMemLeak.c.
| void * mwUnmark | ( | void * | p, |
| const char * | file, | ||
| unsigned | line ) |
Definition at line 821 of file KalFitMemLeak.c.
| int mwVerify | ( | int | exp, |
| const char * | exps, | ||
| const char * | fn, | ||
| int | ln ) |
Definition at line 1328 of file KalFitMemLeak.c.