»
(008) CubeIDE Implementation of USB Peripherals*
(018) C99 pointer*
(019) C99 With only value assignment*
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
🕹️(022) FreeRTOS Hooks
FreeRTOS开放的Hooks: configUSE_IDLE_HOOK configUSE_TICK_HOOK configUSE_MALLOC_FAILED_HOOK configUSE_DAEMON_TASK_STARTUP_HOOK 其中,FreeRTOS的内存分配使用函数: void* pvPortMalloc(size_t xSize); vPortFree(void *pv); heap_1.c: 最简单的实现,只支持分配,无法释放内存。 heap_2.c: 支持分配和释放,内存可能会出现碎片。 heap_3.c: 使用标准库的 malloc 和 free,适合已有内存管理系统的场景。 heap_4.c: 增强版的 heap_2.c,减少碎片化,推荐用于需要频繁分配和释放的情况。 heap_5.c: 最灵活的方案,支持多堆区域分配,适合复杂的内存管理需求。