diff --git a/kernel/include/los_memory.h b/kernel/include/los_memory.h index 134f6464..2c29601c 100644 --- a/kernel/include/los_memory.h +++ b/kernel/include/los_memory.h @@ -120,6 +120,30 @@ extern UINT32 LOS_MemDeInit(VOID *pool); extern UINT32 LOS_MemPoolList(VOID); #endif +#if (LOSCFG_MEM_FREE_BY_TASKID == 1) +/** + * @ingroup los_memory + * @brief Free memory nodes allocated by the specified task. + * + * @par Description: + * + * + * @param pool [IN] The memory pool address. + * @param taskID [IN] The task ID and all memory nodes allocated by this task will be freed. + * + * @retval #OS_ERROR The memory pool is NULL or the task ID is invalid. + * @retval #LOS_OK All memory nodes allocated by this task are freed successfully. + * @par Dependency: + * + * @see None. + */ +extern UINT32 LOS_MemFreeByTaskID(VOID *pool, UINT32 taskID); +#endif + #if (LOSCFG_MEM_MUL_REGIONS == 1) typedef struct { VOID *startAddress;