Fork自 RT-Thread / rt-thread
体验新版 GitCode,发现更多精彩内容 >>
#include <rtthread.h> #include <stdlib.h> size_t get_free_heap_size(void) { rt_uint32_t total, used, max; rt_memory_info(&total, &used, &max); return total - used; }