Both alloc_pending tests requires the main thread to utilize the heap so that child threads must pend on memory allocations. However, the previous implementation was not SMP friendly where the child threads could run and succeeded in memory allocation on other CPUs while the main thread continued to allocate memory. The main thread would fail to allocate memory if the child thread (on other CPU) has not freed the memory yet. Not to mention that, in this scenario, the child thread was not pending on memory allocation which defeated the purpose of the test. So to fix this, make sure the main thread allocates enough memory so future allocations must go into pending. Also, check that the child thread cannot allocation memory when first entered so it is actually going into pending. Signed-off-by: Daniel Leung <daniel.leung@intel.com> |
||
|---|---|---|
| .. | ||
| application_development/gen_inc_file | ||
| arch | ||
| benchmarks | ||
| bluetooth | ||
| boards | ||
| boot/uefi | ||
| cmake/config_dir | ||
| crypto | ||
| drivers | ||
| kernel | ||
| lib | ||
| misc | ||
| net | ||
| posix | ||
| subsys | ||
| unit | ||
| ztest | ||