123456789101112131415161718192021222324252627282930313233343536373839 |
- #include "cmPrefix.h"
- #include "cmGlobal.h"
- #include "cmRpt.h"
- #include "cmErr.h"
- #include "cmCtx.h"
- #include "cmMem.h"
- #include "cmMallocDebug.h"
- #include "cmLinkedHeap.h"
- #include "cmFileSys.h"
- #include "cmText.h"
-
- void print( void* arg, const char* text )
- {
- printf("%s\n",text);
- }
-
- int main( int argc, char* argv[] )
- {
- // initialize the heap check library
- bool memDebugFl = cmDEBUG_FL;
- unsigned memGuardByteCnt = memDebugFl ? 8 : 0;
- unsigned memAlignByteCnt = 16;
- unsigned memFlags = memDebugFl ? kTrackMmFl | kDeferFreeMmFl | kFillUninitMmFl : 0;
-
- cmCtx_t ctx;
- cmCtxSetup(&ctx,"cm test",print,print,NULL,memGuardByteCnt,memAlignByteCnt,memFlags);
-
- cmMdInitialize( memGuardByteCnt, memAlignByteCnt, memFlags, &ctx.rpt );
-
- cmFsInitialize( &ctx, "cm_test" );
-
- cmTsInitialize(&ctx );
-
- cmTsFinalize();
- cmFsFinalize();
- cmMdReport( kIgnoreNormalMmFl );
- cmMdFinalize();
- return 0;
- }
|