libcm is a C development framework with an emphasis on audio signal processing applications.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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. //)