Fix libpayload alloc() size and gcc pointer optimization problems.
authorMarc Jones <marc.jones@se-eng.com>
Tue, 20 Mar 2012 22:53:44 +0000 (16:53 -0600)
committerPeter Stuge <peter@stuge.se>
Wed, 21 Mar 2012 20:03:24 +0000 (21:03 +0100)
commitccee6256b48ad619d16c4479a25937fa95b93efc
tree5e1455e3ad48cd7dd68348b4881f5cdfe7a72960
parent06253cd9a5742078386f355a06c0f13bebbcc5ce
Fix libpayload alloc() size and gcc pointer optimization problems.

The previous commit was incomplete and missed setting the entire
alloc area.

There are also additional problems with gcc optimizations of the
pointer math. The "auto" casting by gcc wouldn't return warnings,
but it was causing the optimization to be incorrect. We are now
very explicit in the casting in the pointer math.

Change-Id: I020808c8d1dda544fe862b9efb0e5345eeab5aab
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/804
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
payloads/libpayload/libc/malloc.c