libcm is a C development framework with an emphasis on audio signal processing applications.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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