mem_std.c 416 B

12345678910111213141516171819202122232425
  1. /*
  2. * File: mem_std.c
  3. * Brief: Replace memory management functions of arm standard c library
  4. *
  5. */
  6. #include "rtthread.h"
  7. /* avoid the heap and heap-using library functions supplied by arm */
  8. #pragma import(__use_no_heap)
  9. void * malloc(int n)
  10. {
  11. return rt_malloc(n);
  12. }
  13. void * realloc(void *rmem, rt_size_t newsize)
  14. {
  15. return rt_realloc(rmem, newsize);
  16. }
  17. void free(void *rmem)
  18. {
  19. rt_free(rmem);
  20. }