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
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user