heap.h 755 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #include <stdbool.h>
  2. #include <stdlib.h>
  3. #include <stdint.h>
  4. #include <cmsis_os.h>
  5. #define configTOTAL_HEAP_SIZE ((size_t)(8192 * 16))
  6. #define configAPPLICATION_ALLOCATED_HEAP 0
  7. #define portBYTE_ALIGNMENT 8
  8. #if portBYTE_ALIGNMENT == 8
  9. #define portBYTE_ALIGNMENT_MASK (0x0007)
  10. #endif
  11. /* No test marker by default. */
  12. #ifndef mtCOVERAGE_TEST_MARKER
  13. #define mtCOVERAGE_TEST_MARKER()
  14. #endif
  15. /* No tracing by default. */
  16. #ifndef traceMALLOC
  17. #define traceMALLOC(pvReturn, xWantedSize)
  18. #endif
  19. /* No tracing by default. */
  20. #ifndef traceFREE
  21. #define traceFREE(pvReturn, xBlockSize)
  22. #endif
  23. /* No assert by default. */
  24. #ifndef configASSERT
  25. #define configASSERT(var)
  26. #endif
  27. bool prvHeapInit(void);
  28. void acquire_memalloc_mutex();
  29. void release_memalloc_mutex();