[U-Boot-Users] memory allocation

Friedrich, Lars lars.friedrich at wago.com
Wed Jul 14 10:42:06 CEST 2004


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
-- 




More information about the U-Boot mailing list