memmgr_heap.h 786 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <stdint.h>
  3. #include <cmsis_os2.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /** Memmgr heap enable thread allocation tracking
  8. * @param thread_id - thread id to track
  9. */
  10. void memmgr_heap_enable_thread_trace(osThreadId_t thread_id);
  11. /** Memmgr heap disable thread allocation tracking
  12. * @param thread_id - thread id to track
  13. */
  14. void memmgr_heap_disable_thread_trace(osThreadId_t thread_id);
  15. /** Memmgr heap get allocatred thread memory
  16. * @param thread_id - thread id to track
  17. * @return bytes allocated right now
  18. */
  19. size_t memmgr_heap_get_thread_memory(osThreadId_t thread_id);
  20. /** Memmgr heap get the max contiguous block size on the heap
  21. * @return size_t max contiguous block size
  22. */
  23. size_t memmgr_heap_get_max_free_block();
  24. #ifdef __cplusplus
  25. }
  26. #endif