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
363# define MW_NML_NONE 0
364# define MW_NML_FREE 1
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
568# define TRACE 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__ )
591# define mwASSERT( exp )
594# define ASSERT mwASSERT
598# define mwVERIFY( exp ) exp
601# define VERIFY mwVERIFY
607 1 ? (void)0 : mwDummyTraceFunction
611# define TRACE mwTRACE
617# define mwDoFlush( n )
623# define mwTest( f, l )
624# define mwSetOutFunc( f )
625# define mwSetAriFunc( f )
626# define mwDefaultAri()
627# define mwNomansland()
628# define mwStatistics( f )
629# define mwMark( p, t, f, n ) ( p )
630# define mwUnmark( p, f, n ) ( p )
631# define mwMalloc( n, f, l ) malloc( n )
632# define mwStrdup( p, f, l ) strdup( p )
633# define mwRealloc( p, n, f, l ) realloc( p, n )
634# define mwCalloc( n, m, f, l ) calloc( n, m )
635# define mwFree( p ) free( p )
636# define mwMalloc_( n ) malloc( n )
637# define mwRealloc_( p, n ) realloc( p, n )
638# define mwCalloc_( n, m ) calloc( n, m )
639# define mwFree_( p ) free( p )
640# define mwAssert( e, es, f, l )
641# define mwVerify( e, es, f, l ) ( e )
642# define mwTrace mwDummyTrace
643# define mwTestBuffer( f, l, b ) ( 0 )
645# define CHECK_THIS( n )
646# define CHECK_BUFFER( b )
647# define MARK( p ) ( p )
648# define UNMARK( p ) ( p )
684# ifndef MEMWATCH_NOCPP
686extern const char *mwNFile;
693void *
operator new(size_t);
694void *
operator new(size_t,
const char *,int);
695void *
operator new[] (size_t,
const char *,int);
696void operator delete(
void *);
697# define mwNew new ( __FILE__, __LINE__ )
698# define mwDelete ( mwNCur = 1, mwNFile = __FILE__, mwNLine = __LINE__ ), delete
const unsigned long mwCounter
#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)
#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)