I prefer a raw Malloc and let the user to wrap it critical themselves.

That is more simple and flexible 

发自我的 iPhone

> 在 2015年10月6日,23:35,Philipp Klaus Krause <p...@spth.de> 写道:
> 
> 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


------------------------------------------------------------------------------
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports 
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to