On Mon, Apr 18, 2011 at 23:50, Steve Kargl
<s...@troutmask.apl.washington.edu> wrote:
> On Mon, Apr 18, 2011 at 11:41:33PM +0300, Janne Blomqvist wrote:
>> Hi,
>>
>> the attached patch replaces gfc_getmem with calls to xcalloc (from
>> libiberty). Apart from reducing duplicated code, calloc is better than
>> malloc + memset, as the allocator knows that the kernel always gives
>> out zeroed pages so in some cases it can avoid memset'in the area.
>>
>> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
>>
>
> OK.

Thanks; I'll commit it later today when I get home.

> (I suppose we'll never have sizeof(char) != 1).

Indeed, ISO C defines sizeof(char) == 1. See 6.5.3.4 (page 80) in n1256.pdf.

-- 
Janne Blomqvist

Reply via email to