[U-Boot] Hanging in kmalloc of nand_scan_tail() function

Kumar Gala galak at kernel.crashing.org
Sat Nov 13 17:24:43 CET 2010


On Nov 12, 2010, at 9:43 PM, terry wrote:

>>> 
>>> by the way,I cann't find the prototype of malloc in the whole project,it
>>> seems that it is encapsulated in some libs.
>> 
>> It's in common/malloc.c.  There's weird preprocessor renaming going on,
>> so it's called mALLOc in that file, but it shows up as malloc in the
>> binary.
> Thanks very much for your carefully instruction.
> 
>> 
>> -Scott
>> 
> 

I haven't been following this thread, but just debugging a malloc/nand "corruption" issue myself.  I'm going to start a new thread on the subject since its more related to malloc.  However can you try the following and see what happens:

diff --git a/include/malloc.h b/include/malloc.h
index 3e145ad..19f0f0b 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -850,7 +850,7 @@ extern Void_t*     sbrk();
 #endif
 
 #ifndef MORECORE_CLEARS
-#define MORECORE_CLEARS 1
+#define MORECORE_CLEARS 0
 #endif
 
 #endif /* INTERNAL_LINUX_C_LIB */


More information about the U-Boot mailing list