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

sl_si91x_host_allocate_buffer calls malloc directly #4

Open
schoeler opened this issue Aug 23, 2023 · 2 comments
Open

sl_si91x_host_allocate_buffer calls malloc directly #4

schoeler opened this issue Aug 23, 2023 · 2 comments

Comments

@schoeler
Copy link

Hi, I noticed the version of sl_si91x_host_allocate_buffer() in malloc_buffers.c calls malloc directly, won't this cause issues with FreeRTOS's pvPortMalloc?

Also, the version of sl_si91x_host_allocate_buffer() in static_buffer.c seems to have dependencies on lwip pbuf, and doesn't seem to check the length or increment the buffer offset to allow for multiple callers? I see this function can be called by multiple callers. it also probably needs a critical section between tasks.

Thanks

@Silabs-Tarun
Copy link

Hello Ben

Thanks for pointing this out.. We will analyze and get back when this can be fixed.

@rozalin-ubihere
Copy link

Hi, I noticed the version of sl_si91x_host_allocate_buffer() in malloc_buffers.c calls malloc directly, won't this cause issues with FreeRTOS's pvPortMalloc?

Also, the version of sl_si91x_host_allocate_buffer() in static_buffer.c seems to have dependencies on lwip pbuf, and doesn't seem to check the length or increment the buffer offset to allow for multiple callers? I see this function can be called by multiple callers. it also probably needs a critical section between tasks.

Thanks

Hey -

I also had this issue, though there's a relatively simple workaround (at least for IAR EWARM). Under the linker tab, add the following command line option. This should redirect any/all instances of 'malloc' within your code to 'pvPortMalloc', and ditto for 'free'.

image

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