libcm is a C development framework with an emphasis on audio signal processing applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmMain.c 802B

12345678910111213141516171819202122232425262728293031323334353637
  1. //( { file_desc:"Template 'main.c' for 'libcm' based program" kw:[demo]}
  2. #include "cmGlobal.h"
  3. #include "cmRpt.h"
  4. #include "cmMem.h"
  5. #include "cmMallocDebug.h"
  6. #include "cmLinkedHeap.h"
  7. void print(void* cmRptUserPtr, const char* text)
  8. { printf(text); }
  9. int main(int argc, char* argv[] )
  10. {
  11. // initialize the heap check library
  12. bool memDebugFl = true;
  13. unsigned memPadByteCnt = memDebugFl ? 8 : 0;
  14. unsigned memAlignByteCnt = 16;
  15. unsigned memFlags = memDebugFl ? kTrackMmFl | kDeferFreeMmFl | kFillUninitMmFl : 0;
  16. cmRpt_t rpt;
  17. cmRptSetup(&rpt,print,print,NULL);
  18. //cmMdTest(&rpt);
  19. //return 0;
  20. cmMdInitialize( memPadByteCnt, memAlignByteCnt, memFlags, &rpt );
  21. cmLHeapTest();
  22. cmMdReport();
  23. cmMdFinalize();
  24. return 0;
  25. }
  26. //)