[RFC] new helper funcs for alloca/malloc with mmu/nommu

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Jul 27 18:46:09 UTC 2010


On Tue, Jul 27, 2010 at 02:27:04PM -0400, Mike Frysinger wrote:
>On Tuesday, July 27, 2010 09:18:43 Bernhard Reutner-Fischer wrote:
>> On Tue, Jul 27, 2010 at 01:57:23AM -0400, Mike Frysinger wrote:
>> >The rpc rcmd code has some ugly ifdef mazes to handle mmu/nommu
>> >differences just to select alloca or malloc.  Unify those with some
>> >helper macros in a new header, and then convert the rcmd code over to it.
>> >
>> >This is all geared towards fixing the getdents helper functions which only
>> >use alloca() atm.  Now that we have helper functions, convert the getdents
>> >functions over too.
>> 
>> uClibc_alloc.h would need a copyright statement.
>> 
>> Short of tweaking gcc to use malloc/free for bfin perhaps we could
>> convert the alloca users inside libc to just use malloc/free instead.
>> I think that would be less ugly..
>
>this isnt Blackfin specific at all.  it's for all nommu users.  and what 

all nommu users, yes.

>you're suggesting is exactly what this commit is doing.
>
>so you'll need to be more specific as to what you're referring to.

i was referring to unconditionally switching to malloc/free but thinking
about it, it penalized mmu too much. In principle your suggestion is ok.

Still, don't you think it would be better to do this in gcc instead of
touching every user?


More information about the uClibc mailing list