This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMITTED] malloc/malloc.c : Remove nested function mi_arena.


On 05/28/2014 09:42 PM, Carlos O'Donell wrote:
> On 05/27/2014 11:15 PM, Rich Felker wrote:
>> Despite my being in favor of eliminating nested functions, I'm in
>> complete agreement. This kind of mechanical transformation with
>> pointers to all of the outer function's locals is utterly hideous to
>> read, and makes the compiler's work much more difficult.
>>
>> I'm in favor of the earlier proposal to inline the code directly.
> 
> That's 4 in favour after review.
> 
> Ondrej, Please feel free to commit your inlining of the function.

I also apologize for not looking closely at the function
in question, and being ideological about trying to keep
the functions as simple as possible. The truth is that as
Rich says, inlining was the better solution.

After I refactored the function I realized it wasn't all
that complex, but by then I'd read the function over a
few times already. I see why Siddhesh also thought inlining
it was the right solution.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]