Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: implement Alloc_With_System_Allocator #3179

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

mkolchurin
Copy link
Contributor

add zephyr libc malloc/realloc/free witch introduced since version 1.13.0

add zephyr libc malloc/realloc/free

Signed-off-by: Maxim Kolchurin <maxim.kolchurin@gmail.com>
@@ -129,8 +129,10 @@ iwasm_main(void *arg1, void *arg2, void *arg3)
init_args.mem_alloc_type = Alloc_With_Pool;
init_args.mem_alloc_option.pool.heap_buf = global_heap_buf;
init_args.mem_alloc_option.pool.heap_size = sizeof(global_heap_buf);
#elif (CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE != 0 || CONFIG_NEWLIB_LIBC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to use

((defined(CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE) && CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE != 0) \
 || defined(CONFIG_NEWLIB_LIBC))`? Some compiler may report error when the macros are not defined.

Check whether macros are defined instead using them directly to avoid potential compilation warnings.
@wenyongh wenyongh merged commit c949f3d into bytecodealliance:main Feb 28, 2024
406 checks passed
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Add zephyr libc malloc/realloc/free which were introduced since version 1.13.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants