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:
@@ -111,8 +111,8 @@
|
||||
#define TOS_CFG_MMHEAP_EN 1u
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_MMHEAP_EN > 0u) && !defined(TOS_CFG_MMHEAP_POOL_SIZE)
|
||||
#define TOS_CFG_MMHEAP_POOL_SIZE 0x1000
|
||||
#ifndef TOS_CFG_MMHEAP_DEFAULT_POOL_EN
|
||||
#define TOS_CFG_MMHEAP_DEFAULT_POOL_EN 1u
|
||||
#endif
|
||||
/////////////////////////////////////////
|
||||
|
||||
@@ -198,10 +198,6 @@
|
||||
#define TOS_CFG_COMPLETION_EN 0u
|
||||
#endif
|
||||
|
||||
#ifndef TOS_CFG_MMHEAP_EN
|
||||
#define TOS_CFG_MMHEAP_EN 0u
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_QUEUE_EN > 0u) && !defined(TOS_CFG_MSG_EN)
|
||||
#define TOS_CFG_MSG_EN 1u
|
||||
#elif (TOS_CFG_QUEUE_EN == 0u) && !defined(TOS_CFG_MSG_EN)
|
||||
@@ -260,8 +256,8 @@
|
||||
#define TOS_CFG_MMHEAP_EN 0u
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_MMHEAP_EN > 0u) && !defined(TOS_CFG_MMHEAP_POOL_SIZE)
|
||||
#define TOS_CFG_MMHEAP_POOL_SIZE 0x1000
|
||||
#ifndef TOS_CFG_MMHEAP_DEFAULT_POOL_EN
|
||||
#define TOS_CFG_MMHEAP_DEFAULT_POOL_EN 1u
|
||||
#endif
|
||||
|
||||
#ifndef TOS_CFG_PWR_MGR_EN
|
||||
|
Reference in New Issue
Block a user