Hi Graeme,

Thanks a lot for prompt reply and helping me in resolving my problem. The 
problem was that my board specific code was calling malloc before " 
mem_malloc_init" being called. Moving my code after calling mem_malloc_init 
resolved the issue.

Thanks a lot. :-)

Thanks and Regards,
Sandeep


-----Original Message-----
From: Graeme Russ [mailto:[email protected]] 
Sent: 01 June 2012 11:47
To: Sandeep Kumar
Cc: [email protected]
Subject: Re: [U-Boot] facing issues with malloc in U-Boot

Hi Sandeep,

On Fri, Jun 1, 2012 at 3:50 PM, Sandeep Kumar <[email protected]> 
wrote:
> Hi ,
>
> I am using vexpress board (ca9x4_ct_vxp). During run time all the malloc are 
> failing even if it's of 1 byte. I tried to increase the malloc pool size to 
> 1MB also but it is not helping out. Any king of pointer or help will be 
> highly appreciated.

The comments in dlmalloc.c indicate that do_check_chunk() is intended to catch 
memory corruption. A few further quick questions:

1) Is this reproducible on multiple boards? Can you rule-out SDRAM component 
failures?
2) Is mem_malloc_init() being called - I assume so as a) this is a in-tree 
board without apparent modification and b) malloc() checks for init
3) Is the failure during the first call to malloc()? If not, is the failure 
always at the same location?

I think you are going to need to add some printf() debugging in dlmalloc()

Regards,

Graeme

P.S. Please stop top-posting

>
> Thanks and Regards,
> Sandeep
>
>
> -----Original Message-----
> From: Graeme Russ [mailto:[email protected]]
> Sent: 01 June 2012 05:21
> To: Sandeep Kumar
> Cc: [email protected]
> Subject: Re: [U-Boot] facing issues with malloc in U-Boot
>
> Hi Sandeep,
>
> On Fri, Jun 1, 2012 at 1:42 AM, Sandeep Kumar 
> <[email protected]> wrote:
>> Hi Everyone,
>>
>> I am facing issues with malloc in U-Boot while trying to allocate some 
>> memory. Here are the prints which I am getting after enabling the debug.
>>
>> U-Boot 2011.12 (May 31 2012 - 20:49:16)
>
> What board are you using?
>
> Regargs,
>
> Graeme
> <PRE><font size="2" face="calibri" color="blue">The information 
> transmitted is intended only for the person or entity to which it is 
> addressed and may contain confidential and/or privileged material.If 
> you are not the intended recipient of this message please do not read, 
> copy, use or disclose this communication and notify the sender 
> immediately.It should be noted that any review, retransmission, 
> dissemination or other use of, or taking action or reliance upon, this 
> information by persons or entities other than the intended recipient 
> is prohibited.</PRE>
>
>
<PRE><font size="2" face="calibri" color="blue">The information transmitted is 
intended only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material.If you are not the intended recipient 
of this message please do not read, copy, use or disclose this communication 
and notify the sender immediately.It should be noted that any review, 
retransmission, dissemination or other use of, or taking action or reliance 
upon, this information by persons or entities other than the intended recipient 
is prohibited.</PRE>

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to