Threadx 字节内存池内存释放_tx_byte_release
_tx_byte_release _tx_byte_release用于内存释放,原理参考上篇博文: Threadx 内存管理-内存字节池 UINT _tx_byte_release ( VOID * memory_ptr ) { TX_INTERRUPT_SAVE_AREA REG_1 TX_BYTE_POOL * pool_ptr ; /* Pool pointer */ REG_2 TX_THREAD * thread_ptr ; /* Working thread pointer */ REG_3 CHAR_PTR work_ptr ; /* Working block pointer */ REG_4 TX_THREAD * susp_thread_ptr ; /* Suspended thread pointer */ UINT preempt = 0 ; /* Preemption counter */ /* Determine if the memory pointer is valid. */ #def 记录要释放内存起始地址 work_ptr = ( CHAR_PTR ) memory_ptr ; if ( work_ptr ) { /* Back off the memory pointer to pickup its header. */ #def