From: Wolfgang Denk Date: Sun, 06 Jul 2008 22:50:16 +0200 Subject: [U-Boot-Users] [PATCH] fs: make the static array to dynamic allocation In-Reply-To: Your message of "Thu, 26 Jun 2008 22:50:34 +0800." <1214491834-27033-1-git-send-email-daveliu@freescale.com> Message-ID: <20080706205016.E815324681@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1214491834-27033-1-git-send-email-daveliu@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