[riot-notifications] [RIOT-OS/RIOT] sys/oneway-malloc: export oneway_malloc() (#15474)

benpicco notifications at github.com
Thu Nov 19 17:17:26 CET 2020



<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description

The one-way malloc() implementation is declared weak, so it will be overwritten if libc provides a proper implementation.

For some situations however it is useful to allocate a block of memory on init, that is not going to be freed.
Here we don't need to pay the additional accounting overhead of `malloc()`, a one-way malloc would be entirely sufficient.

For this, make the one-way malloc implementation accessible as `oneway_malloc()`.

### Testing procedure

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references

https://github.com/RIOT-OS/RIOT/pull/14448#issuecomment-730476564

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15474

-- Commit Summary --

  * sys/oneway-malloc: export oneway_malloc()

-- File Changes --

    M sys/oneway-malloc/include/malloc.h (7)
    M sys/oneway-malloc/oneway-malloc.c (10)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15474.patch
https://github.com/RIOT-OS/RIOT/pull/15474.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15474
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201119/dd5d8da7/attachment-0001.htm>


More information about the notifications mailing list