memmgr.h 632 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @file memmgr.h
  3. * Furi: memory managment API and glue
  4. */
  5. #pragma once
  6. #include <stddef.h>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include "check.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. // define for test case "link against furi memmgr"
  14. #define FURI_MEMMGR_GUARD 1
  15. /** Get free heap size
  16. *
  17. * @return free heap size in bytes
  18. */
  19. size_t memmgr_get_free_heap(void);
  20. /** Get total heap size
  21. *
  22. * @return total heap size in bytes
  23. */
  24. size_t memmgr_get_total_heap(void);
  25. /** Get heap watermark
  26. *
  27. * @return minimum heap in bytes
  28. */
  29. size_t memmgr_get_minimum_free_heap(void);
  30. #ifdef __cplusplus
  31. }
  32. #endif