syscalls_mem.c 507 B

123456789101112131415161718192021222324252627282930313233
  1. #include "stddef.h"
  2. #include "FreeRTOS.h"
  3. #include "task.h"
  4. #ifdef __CC_ARM
  5. /* avoid the heap and heap-using library functions supplied by arm */
  6. #pragma import(__use_no_heap)
  7. #endif /* __CC_ARM */
  8. void *malloc(size_t n)
  9. {
  10. return pvPortMalloc(n);
  11. }
  12. void *realloc(void *rmem, size_t newsize)
  13. {
  14. return pvPortRealloc(rmem,newsize);
  15. }
  16. void *calloc(size_t nelem,size_t elsize)
  17. {
  18. return pvPortCalloc(nelem,elsize);
  19. }
  20. void free(void *rmem)
  21. {
  22. vPortFree(rmem);
  23. }