[U-Boot-Users] memory allocation

Is there a (good) reason why the mem_alloc_init for ARM (and some other) targets zeroes out the malloc pool?
from ./lib_arm/board.c: static void mem_malloc_init (ulong dest_addr) { mem_malloc_start = dest_addr; mem_malloc_end = dest_addr + CFG_MALLOC_LEN; mem_malloc_brk = mem_malloc_start;
memset ((void *) mem_malloc_start, 0, mem_malloc_end - mem_malloc_start);
This seems very redundant to me. I removed the memset code and didn't run into any trouble so far, but maybe I was just lucky.
Best regards, Lars Friedrich

In message 96A7A8B8A8ACBA4DAF7FD558BD32799BF56083@svex01001 you wrote:
Is there a (good) reason why the mem_alloc_init for ARM (and some other) targets zeroes out the malloc pool?
Paranoia?
BTW: the same is done on other architectures, too.
This seems very redundant to me. I removed the memset code and didn't run into any trouble so far, but maybe I was just lucky.
We do a lot of redundand things that help to improve styability ;-)
Best regards,
Wolfgang Denk
participants (2)
-
Friedrich, Lars
-
Wolfgang Denk