add tos_mmheap_check & tos_mmheap_pool_check API and TOS_CFG_MMHEAP_DEFAULT_POOL_EN switch

tos_mmheap_check: get the information of the heap(space that is free and used)
tos_mmheap_pool_check: get the information of a pool
TOS_CFG_MMHEAP_DEFAULT_POOL_EN: enable the default pool of the heap(if user not set this, a default of 1u is set). if you wanna disable the default pool, you should call tos_mmheap_pool_add to add your own pool of the heap before tos_mmheap_alloc is called.
This commit is contained in:
daishengdong
2019-10-14 22:09:57 +08:00
parent 98b7434097
commit 3a8b03432f
48 changed files with 267 additions and 78 deletions

View File

@@ -47,6 +47,9 @@ typedef enum k_err_en {
K_ERR_MMHEAP_INVALID_POOL_ADDR = 800u,
K_ERR_MMHEAP_INVALID_POOL_SIZE,
K_ERR_MMHEAP_POOL_OVERFLOW,
K_ERR_MMHEAP_POOL_ALREADY_EXIST,
K_ERR_MMHEAP_POOL_NOT_EXIST,
K_ERR_MSG_QUEUE_FULL = 900u,
K_ERR_MSG_QUEUE_EMPTY,