tests: heap: validate sys_heap_runtime_stats_get API
Add CONFIG_SYS_HEAP_RUNTIME_STATS in existing heap tests to enable validation for sys_heap_runtime_stats_get API. Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
This commit is contained in:
parent
28f834c914
commit
f4cf484ac6
3 changed files with 11 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_SYS_HEAP_VALIDATE=y
|
||||
CONFIG_SYS_HEAP_RUNTIME_STATS=y
|
||||
|
|
|
@ -38,7 +38,16 @@
|
|||
|
||||
#define BIG_HEAP_SZ MIN(256 * 1024, MEMSZ / 3)
|
||||
#define SMALL_HEAP_SZ MIN(BIG_HEAP_SZ, 2048)
|
||||
|
||||
/* With enabling SYS_HEAP_RUNTIME_STATS, the size of struct z_heap
|
||||
* will increase 16 bytes on 64 bit CPU.
|
||||
*/
|
||||
#ifdef CONFIG_SYS_HEAP_RUNTIME_STATS
|
||||
#define SOLO_FREE_HEADER_HEAP_SZ (80)
|
||||
#else
|
||||
#define SOLO_FREE_HEADER_HEAP_SZ (64)
|
||||
#endif
|
||||
|
||||
#define SCRATCH_SZ (sizeof(heapmem) / 2)
|
||||
|
||||
/* The test memory. Make them pointer arrays for robust alignment
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_SYS_HEAP_VALIDATE=y
|
||||
CONFIG_SYS_HEAP_RUNTIME_STATS=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue