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:
@@ -28,6 +28,12 @@
|
||||
#error "INVALID config, tickless not supported in event-driven yet"
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_MMHEAP_EN > 0u) && (TOS_CFG_MMHEAP_DEFAULT_POOL_EN > 0u)
|
||||
#if !defined(TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE) || (TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE == 0u)
|
||||
#error "INVALID config, must define a valid TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else /* TOS_CFG_EVENT_DRIVEN_EN */
|
||||
|
||||
#if TOS_CFG_TASK_PRIO_MAX < 8u
|
||||
@@ -42,6 +48,12 @@
|
||||
#error "UNDECLARED config, TOS_CFG_TIMER_AS_PROC"
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_MMHEAP_EN > 0u) && (TOS_CFG_MMHEAP_DEFAULT_POOL_EN > 0u)
|
||||
#if !defined(TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE) || (TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE == 0u)
|
||||
#error "INVALID config, must define a valid TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (TOS_CFG_VFS_EN > 0u) && (TOS_CFG_MMHEAP_EN == 0u)
|
||||
#error "INVALID config, must enable tos_mmheap to use tos_vfs"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user