[U-Boot] [PATCH 02/11] env_mmc.c: Make the non-redundant env_relocate_spec use malloc not stack

Tom Rini trini at ti.com
Sun Oct 6 22:40:46 CEST 2013


On Sat, Oct 05, 2013 at 10:00:13PM +0200, Wolfgang Denk wrote:
> Dear Tom Rini,
> 
> In message <1380227287-26057-3-git-send-email-trini at ti.com> you wrote:
> > Switch the case of non-redundant non-embedded environment to use malloc
> > to allocate buffers, rather than place them on the stack, like the
> > redundant case does.
> 
> What exactly would be the benefit of this change?  It just adds code
> size and execution time and makes the code more complex, without any
> appearent advanteages?

The main advantage is that we can use this code in environments with
less than CONFIG_ENV_SIZE worth of stack available.  Arguably it makes
the behaviour and code paths similar for redundant and non-redundant
cases (but someone posted a patch to make the redundant case use the
stack).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131006/709d66b3/attachment.pgp>


More information about the U-Boot mailing list