[riot-notifications] [RIOT-OS/RIOT] cpu/msp430_common: add real malloc/free functions (#10944)

Gunar Schorcht notifications at github.com
Fri Mar 22 16:40:19 CET 2019

> If this is not msp430-specific, I'd rather have it as a module in sys (like oneway_malloc) so it can be reused. I started some work long ago on modularizing some parts of the newlib support code (#9258 ).

Hm, I think it is MSP430 specific since only AVR and MSP430 do not use newlibc. Since AVR uses `avrlibc`, the only platform which might require such an implementation is MSP430. Therefore, yes it is platform specific.

> One problem I see with this implementation is that it is not thread safe.

Since it is a simply a slight adaption of `malloc` functions of `avrlibc`, it is as thread safe as the `avrlibc` is. However, it shouldn't be a big thing to define critical sections disabling interrupts or using guard variables as `baselibc` does.

> How does this compare to the implementation in baselibc?

Concerning the complexity and the code size, it seems to be very similar to `baslibc`'s malloc.

`Baslibc` seems to be an interesting project. I saw your PR #10292 which is labled as WIP. Once, this is merged, I would be fine to use this package instead of this specialized implementation. But until then, implementation in this PR could help to have real heap capabilities in MSP430. `oneway_malloc` seems to have no real worth.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190322/541cafd6/attachment-0001.html>

More information about the notifications mailing list