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

question: Specify size of malloc arena #32827

Closed
maxbachmann opened this issue Mar 3, 2021 · 2 comments
Closed

question: Specify size of malloc arena #32827

maxbachmann opened this issue Mar 3, 2021 · 2 comments

Comments

@maxbachmann
Copy link
Contributor

I am using the Up Squared board with the following settings:

CONFIG_CPLUSPLUS=y
CONFIG_NEWLIB_LIBC=y
CONFIG_LIB_CPLUSPLUS=y

For k_malloc I can specify the memory size using:

CONFIG_HEAP_MEM_POOL_SIZE=207872000

However, I did not find a way to do the same for malloc.

CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=207872000

works only when MINIMAL_LIBC is used. With no settings, I can only allocate 1mb of memory using malloc.
Is there a different config setting I have to use in my case?

@dcpleung
Copy link
Member

dcpleung commented Mar 3, 2021

That should be CONFIG_NEWLIB_LIBC_MAX_MAPPED_REGION_SIZE.

@nashif nashif added the question label Mar 3, 2021
@maxbachmann
Copy link
Contributor Author

Thanks, that's the setting I was searching.

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

No branches or pull requests

3 participants