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.

123456789101112131415161718192021222324252627282930313233343536373839
  1. //| Copyright: (C) 2009-2020 Kevin Larke <contact AT larke DOT org>
  2. //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. //( { file_desc:"Template 'main.c' for 'libcm' based program" kw:[demo]}
  4. #include "cmGlobal.h"
  5. #include "cmRpt.h"
  6. #include "cmMem.h"
  7. #include "cmMallocDebug.h"
  8. #include "cmLinkedHeap.h"
  9. void print(void* cmRptUserPtr, const char* text)
  10. { printf(text); }
  11. int main(int argc, char* argv[] )
  12. {
  13. // initialize the heap check library
  14. bool memDebugFl = true;
  15. unsigned memPadByteCnt = memDebugFl ? 8 : 0;
  16. unsigned memAlignByteCnt = 16;
  17. unsigned memFlags = memDebugFl ? kTrackMmFl | kDeferFreeMmFl | kFillUninitMmFl : 0;
  18. cmRpt_t rpt;
  19. cmRptSetup(&rpt,print,print,NULL);
  20. //cmMdTest(&rpt);
  21. //return 0;
  22. cmMdInitialize( memPadByteCnt, memAlignByteCnt, memFlags, &rpt );
  23. cmLHeapTest();
  24. cmMdReport();
  25. cmMdFinalize();
  26. return 0;
  27. }
  28. //)