[Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread Philipp Klaus Krause
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 critic

Re: [Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread Henry Hallam
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

Re: [Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread Alan Cox
On Tue, 06 Oct 2015 17:35:36 +0200 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 ye

Re: [Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread ESSAISSI
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 favo

Re: [Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread 网易
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 写道: > > 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,

Re: [Sdcc-user] Should malloc() and friends be reentrent?

2015-10-06 Thread Kustaa Nyholm
>> 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. I've never used malloc and not se my going to use it in interrupt so personally