/* Validate allocation and free from system heap memory pool. 
Set heap memory as resource pool. It will success when alloc a block of memory smaller than the pool and will fail when alloc a block of memory larger than the pool. */
ZTEST(mheap_api, test_sys_heap_mem_pool_assign)
/* Validate allocation and free from system heap memory pool. 
Set heap memory as resource pool. It will success when alloc a block of memory smaller than the pool and will fail when alloc a block of memory larger than the pool. */
ZTEST(mheap_api, test_sys_heap_mem_pool_assign)
{
	if (!IS_ENABLED(CONFIG_MULTITHREADING)) {
		return;
	}
	void *ptr;
	k_thread_system_pool_assign(k_current_get());
	ptr = (char *)z_thread_malloc(BLK_SIZE_MIN/2);
	zassert_not_null(ptr, "bytes allocation failed from system pool");
	k_free(ptr);
	zassert_is_null((char *)z_thread_malloc(BLK_SIZE_MAX * 2),
						"overflow check failed");
}