348#define MW_ARI_NULLREAD 0x10
349#define MW_ARI_ABORT 0x04
350#define MW_ARI_RETRY 0x02
351#define MW_ARI_IGNORE 0x01
353#define MW_VAL_NEW 0xFE
354#define MW_VAL_DEL 0xFD
355#define MW_VAL_NML 0xFC
356#define MW_VAL_GRB 0xFB
358#define MW_TEST_ALL 0xFFFF
359#define MW_TEST_CHAIN 0x0001
360#define MW_TEST_ALLOC 0x0002
361#define MW_TEST_NML 0x0004
366#define MW_NML_DEFAULT 0
368#define MW_STAT_GLOBAL 0
369#define MW_STAT_MODULE 1
370#define MW_STAT_LINE 2
371#define MW_STAT_DEFAULT 0
378#define MW_TRACE_BUFFER 2048
379#define MW_FREE_LIST 64
447unsigned mwGrab(
unsigned kilobytes );
448unsigned mwDrop(
unsigned kilobytes );
455void *
mwMark(
void *p,
const char *description,
const char *
file,
unsigned line );
456void *
mwUnmark(
void *p,
const char *
file,
unsigned line );
482int mwTest(
const char *
file,
int line,
int mw_test_flags );
484int mwAssert(
int,
const char*,
const char*,
int );
485int mwVerify(
int,
const char*,
const char*,
int );
510void mwTrace(
const char* format_string, ... );
534void*
mwMalloc(
size_t,
const char*,
int );
536void*
mwRealloc(
void *,
size_t,
const char*,
int );
538void*
mwCalloc(
size_t,
size_t,
const char*,
int );
540void mwFree(
void*,
const char*,
int );
542char*
mwStrdup(
const char *,
const char*,
int );
553#define mwASSERT(exp) while(mwAssert((int)(exp),#exp,__FILE__,__LINE__))
556#define ASSERT mwASSERT
559#define mwVERIFY(exp) while(mwVerify((int)(exp),#exp,__FILE__,__LINE__))
562#define VERIFY mwVERIFY
565#define mwTRACE mwTrace
578#define malloc(n) mwMalloc(n,__FILE__,__LINE__)
579#define strdup(p) mwStrdup(p,__FILE__,__LINE__)
580#define realloc(p,n) mwRealloc(p,n,__FILE__,__LINE__)
581#define calloc(n,m) mwCalloc(n,m,__FILE__,__LINE__)
582#define free(p) mwFree(p,__FILE__,__LINE__)
583#define CHECK() mwTest(__FILE__,__LINE__,MW_TEST_ALL)
584#define CHECK_THIS(n) mwTest(__FILE__,__LINE__,n)
585#define CHECK_BUFFER(b) mwTestBuffer(__FILE__,__LINE__,b)
586#define MARK(p) mwMark(p,#p,__FILE__,__LINE__)
587#define UNMARK(p) mwUnmark(p,__FILE__,__LINE__)
594#define ASSERT mwASSERT
598#define mwVERIFY(exp) exp
601#define VERIFY mwVERIFY
606#define mwTRACE 1?(void)0:mwDummyTraceFunction
623#define mwSetOutFunc(f)
624#define mwSetAriFunc(f)
625#define mwDefaultAri()
626#define mwNomansland()
627#define mwStatistics(f)
628#define mwMark(p,t,f,n) (p)
629#define mwUnmark(p,f,n) (p)
630#define mwMalloc(n,f,l) malloc(n)
631#define mwStrdup(p,f,l) strdup(p)
632#define mwRealloc(p,n,f,l) realloc(p,n)
633#define mwCalloc(n,m,f,l) calloc(n,m)
634#define mwFree(p) free(p)
635#define mwMalloc_(n) malloc(n)
636#define mwRealloc_(p,n) realloc(p,n)
637#define mwCalloc_(n,m) calloc(n,m)
638#define mwFree_(p) free(p)
639#define mwAssert(e,es,f,l)
640#define mwVerify(e,es,f,l) (e)
641#define mwTrace mwDummyTrace
642#define mwTestBuffer(f,l,b) (0)
645#define CHECK_BUFFER(b)
683#ifndef MEMWATCH_NOCPP
685extern const char *mwNFile;
692void *
operator new(size_t);
693void *
operator new(size_t,
const char *,int);
694void *
operator new[] (size_t,
const char *,int);
695void operator delete(
void *);
696#define mwNew new(__FILE__,__LINE__)
697#define mwDelete (mwNCur=1,mwNFile=__FILE__,mwNLine=__LINE__),delete
#define mwMark(p, t, f, n)
void mwDummyTraceFunction(const char *,...)
#define mwAssert(e, es, f, l)
#define mwVerify(e, es, f, l)
int mwAriHandler(const char *cause)
void mwFreeBufferInfo(int onoff)
#define mwUnmark(p, f, n)
void mwAutoCheck(int onoff)
void mwBreakOut(const char *cause)
int mwIsReadAddr(const void *p, unsigned len)
#define mwMalloc(n, f, l)
#define mwRealloc(p, n, f, l)
#define mwTestBuffer(f, l, b)
const unsigned long mwCounter
#define mwCalloc(n, m, f, l)
int mwIsSafeAddr(void *p, unsigned len)
void mwNoMansLand(int mw_nml_level)
#define mwStrdup(p, f, l)
void mwSetAriAction(int mw_ari_value)