binfmt: Call umm_initialize() for BUILD_KERNEL & ADDRENV

Summary:
- I noticed that the user heap is not initialized correctly
  if BUILD_KERNEL=y and ADDRENV=y
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with sabre-6quad:netknsh (not merged yet)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2022-02-11 15:45:09 +09:00 committed by Petro Karashchenko
parent bc12260540
commit a44a0a08cd
1 changed files with 3 additions and 0 deletions

View File

@ -160,6 +160,9 @@ int exec_module(FAR const struct binary_s *binp,
binfmt_freeargv(argv);
goto errout_with_tcb;
}
binfo("Initialize the user heap (heapsize=%d)\n", binp->addrenv.heapsize);
umm_initialize((FAR void *)CONFIG_ARCH_HEAP_VBASE, binp->addrenv.heapsize);
#endif
/* Note that tcb->flags are not modified. 0=normal task */