[U-Boot-Users] [PATCH] fs: make the static array to dynamic allocation

Wolfgang Denk wd at denx.de
Sun Jul 6 22:50:16 CEST 2008


In message <1214491834-27033-1-git-send-email-daveliu at freescale.com> you wrote:
> Current fat.c have three 64KB static array, it makes
> the BSS section larger.
> Change the static to dynamic allocation.

So what's the benefit? BSS size doesn't matter - itr comes for free.
It get's initialized automatically.

You add more than 30 lines of code instead, plus a lot of string
space, plus a new failure mode (malloc failed) that didn't exist
before.

Looks like a pessimizing patch to me, but maybe you just did not
describe which problem you are trying to fix?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Remember, there's a big difference between kneeling down and  bending
over.                                                   - Frank Zappa




More information about the U-Boot mailing list