Dear Mr / Ms,

Would it be possible to have "both" , and then have it
switchable/chosen by a compiler option / pragma etc ... ?




Met vriendelijke groet


ESSAISSI, Rémi Julien



On Tuesday, 06-10-2015 at 19:07 Henry Hallam wrote:


My uses do not require malloc() to be reentrant, and I favor the lower
interrupt latency and potentially smaller code/ram footprint of the
simpler malloc().

Thanks,
Henry

On Tue, Oct 6, 2015 at 8:35 AM, Philipp Klaus Krause  wrote:
> We are planning to replace SDCC'c current two memory allocators by a
new
> one. In one of the curent two (used in mcs51, ds390, hc08) malloc()
and
> friends code is in a critical section, in the other, it is not.
>
> We have not yet decided which way the new allocator should go here.
>
> Advantages of critical section inside malloc(): malloc() can be
called
> from interrupt handlers, multiple threads from OSses without any
support
> on the OS side.
> Advantages of malloc() not having critical sections: Lower interupt
> latency, since malloc() can then be interrupted.
>
> When malloc() does not have critical sections, it is still possible
to
> get the advantages and disadvatages by wrapping all calls to
malloc() in
> critical sections (like e.g. the pvPortMalloc from FreeRTOS does).
>
> Philipp
>
>
>
------------------------------------------------------------------------------
>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user


------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to